Nastro
Nastro

Reputation: 1769

How to specify a HUB in my RSS to conform with WebSub?

I have RSS feed. I want to update information about my post instantly with WebSub server. I chose Google Free server https://pubsubhubbub.appspot.com/. There is an instruction on server's main page:

Add an //atom:link tag under //atom:feed for Atom feeds or under //rss:rss/channel for RSS feeds. The //atom:link tag should have rel attribute set to hub and href attribute set to https://pubsubhubbub.appspot.com/

I do not understand what or under //rss:rss/channel for RSS feeds means? According to instruction I have to add a link to channel section of my feed.xml. But I do not understand how this link should look like?

I found the example for atom feed here. The atom link should look like this:

<link rel="hub" href="https://pubsubhubbub.appspot.com/" xmlns="http://www.w3.org/2005/Atom" />

Can't find any example for RSS feed. Any thoughts?

This is an example of my feed.xml:

<?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>[email protected] (Anna Name)</author>

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

        </item>

    </channel>

</rss>

Upvotes: 0

Views: 727

Answers (1)

cweiske
cweiske

Reputation: 31068

"Under //rss:rss/channel" means below the <channel> tag that is below the <rss> tag.

<?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>

Upvotes: 1

Related Questions