首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在我的RSS中指定符合WebSub的集线器?

如何在我的RSS中指定符合WebSub的集线器?
EN

Stack Overflow用户
提问于 2020-11-04 15:49:44
回答 1查看 300关注 0票数 0

我有RSS提要。我想立即用WebSub服务器更新关于我的帖子的信息。我选择了Google服务器https://pubsubhubbub.appspot.com/。服务器主页上有一条指令:

在// Atom :feed下为Atom提要添加//atom:link标记,或在// RSS :rss/channel下为RSS提要添加一个链接标记。//atom:link标记应该将rel属性设置为hub,href属性设置为https://pubsubhubbub.appspot.com/

我不明白or under //rss:rss/channel for RSS feeds是什么意思?根据指示,我必须添加一个链接到我的feed.xml频道部分。但是我不明白这个链接应该是什么样子?

我找到了原子提要这里的示例。原子链接应该如下所示:

代码语言:javascript
复制
<link rel="hub" href="https://pubsubhubbub.appspot.com/" xmlns="http://www.w3.org/2005/Atom" />

无法找到RSS提要的任何示例。有什么想法吗?

这是我的feed.xml的一个例子:

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:media="http://search.yahoo.com/mrss/">

    <channel>
        <title>Примеры фида RSS в Google Новостях</title>

        <link>https://www.mysite.ua/static/rss/newsline.xml</link>

        <description>Это примеры фида RSS в Google Новостях.</description>

        <lastBuildDate>Fri, 23 Jan 2015 23:26:19 +0000</lastBuildDate>

        <item>

            <guid>https://mysite.ua/url-post.html</guid>

            <pubDate>Fri, 23 Jan 2015 23:17:00 +0000</pubDate>

            <title>Example 1</title>

            <description>Desc</description>

            <content:encoded>

                <![CDATA[<p>Lorem ipsum dolor ]]>

            </content:encoded>

            <link>http://examples.com/sample-post.html</link>

            <author>pochta@example.com (Anna Name)</author>

            <enclosure url="https://examples.com/img/1300x820.jpg" type="image/jpeg" length="0"/>

        </item>

    </channel>

</rss>
EN

回答 1

Stack Overflow用户

发布于 2021-10-15 14:19:43

“下面/rss:rss/channel”是指位于<channel>标记之下的<rss>标记之下。

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <link rel="hub" href="https://pubsubhubbub.appspot.com/" xmlns="http://www.w3.org/2005/Atom" />
    </channel>
</rss>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64683331

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档