我的网站上有 BuddyPress,当我尝试访问链接 RSS 时,结果是这样的:
此 XML 文件似乎没有任何与之关联的样式信息
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" version="2.0">
<channel>
<title>SmartCrow | Activités du site</title>
<link>http://smartcrow.pe.hu/activites-du-site/</link>
<atom:link href="http://smartcrow.pe.hu/activites-du-site/feed/" rel="self" type="application/rss+xml" />
<description>Fil d'activité de tout le site</description>
<lastBuildDate>Tue, 25 Apr 2017 17:32:58 +0000</lastBuildDate>
<generator>https://buddypress.org/?v=2.8.2</generator>
<language>fr-FR</language>
<ttl>30</ttl>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>2</sy:updateFrequency>
<item>
<guid isPermaLink="false">2fae35002159291b18f0446066133f9f</guid>
<title>admin a publié une note: j</title>
<link>http://smartcrow.pe.hu/activites-du-site/p/3/</link>
<pubDate>Tue, 25 Apr 2017 17:28:05 +0000</pubDate>
<content:encoded><![CDATA[<p>j</p>]]></content:encoded>
<slash:comments>0</slash:comments>
</item>
</channel>
</rss>
我该怎么办?
该消息表示 XML 没有任何样式可以比简单的 xml 更好地呈现它。 这种样式可以是一个简单的 css,就像您用来设置 html 网页样式的 css。
您应该将此代码添加到 RSS 文件的标题中
<?xml version="1.0" ?>
<?xml-stylesheet type="text/css" href="http://your.site/rss.css" ?>
并使用先前添加到 RSS 的 xml-stylesheet 标签将调用的文件名创建一个外部 css 文件。
rss {
display: block;
font-family: verdana, arial;
}
title {
display: block;
margin: 5px;
padding: 2px;
color: gray;
border-bottom: 1px solid silver;
}
link {
display: block;
font-size: small;
padding-left: 10px;
}
item {
display: block;
padding: 2px 30px 2px 30px;
}
docs {
display: block;
background-color: #ffffe6;
margin: 20px;
text-align: center;
padding: 5px;
color: #7f7f7f;
border: 1px solid silver;
}
/* all hidden elements */
language, lastBuildDate, ttl, guid, category, description, pubDate {
display: none;
}
随意修改CSS;-)
重新根系统猫日志并启动 KAI 12,从内置 1 运行新防火墙并运行程序,完成后只需使用故障排除来配置所有系统网络。