Adding pubsubhubbub link tag to Atom feed

719 views Asked by At

According to Google the link tag containing the URL to the pubsubhubbub hub (This is a really terrible name) needs to go under the Atom entry element like so:

<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-GB" xmlns="http://www.w3.org/2005/Atom">
  <!-- ... -->
  <entry>
    <link rel="hub" href="https://pubsubhubbub.appspot.com/" />
    <!-- ... -->
  </entry>
</feed>

However, all the implementations and blog posts I have seen add it to the feed element instead like so:

<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-GB" xmlns="http://www.w3.org/2005/Atom">
  <!-- ... -->
  <link rel="hub" href="https://pubsubhubbub.appspot.com/" />
  <entry>
    <!-- ... -->
  </entry>
</feed>

What is the correct location for it?

1

There are 1 answers

1
Matthias Pfefferle On BEST ANSWER

It should be at the feed level: http://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.3.html#discovery (that is btw. the same spec, Google is referencing).