Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

emit PubSubHubbub atom:link tags in rss10 and rss20

  • Loading branch information...
commit b5c28795707ed95dbc5bf6011b617fd4b20bac03 1 parent 37d98f5
@mdomsch mdomsch authored committed
View
2  planet/config.py
@@ -105,6 +105,8 @@ def define_tmpl_int(name, default):
define_planet('output_theme', '')
define_planet('output_dir', 'output')
define_planet('spider_threads', 0)
+ # set pubsubhubbub_hub to None to prevent it from being emitted
+ define_planet('pubsubhubbub_hub', 'http://pubsubhubbub.appspot.com')
define_planet_int('new_feed_items', 0)
define_planet_int('feed_timeout', 20)
View
1  planet/shell/tmpl.py
@@ -219,6 +219,7 @@ def template_info(source):
output['link'] = config.link()
output['owner_name'] = config.owner_name()
output['owner_email'] = config.owner_email()
+ output['pubsubhubbub_hub'] = config.pubsubhubbub_hub()
if config.feed():
output['feed'] = config.feed()
output['feedtype'] = config.feed().find('rss')>=0 and 'rss' or 'atom'
View
4 themes/common/rss10.xml.tmpl
@@ -4,12 +4,16 @@
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
+ xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="<TMPL_VAR link ESCAPE="HTML">">
<title><TMPL_VAR name ESCAPE="HTML"></title>
<link><TMPL_VAR link ESCAPE="HTML"></link>
<description><TMPL_VAR name ESCAPE="HTML"> - <TMPL_VAR link ESCAPE="HTML"></description>
+ <TMPL_IF pubsubhubbub_hub>
+ <atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/>
+ </TMPL_IF>
<items>
<rdf:Seq>
View
5 themes/common/rss20.xml.tmpl
@@ -1,11 +1,14 @@
<?xml version="1.0"?>
-<rss version="2.0">
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title><TMPL_VAR name></title>
<link><TMPL_VAR link ESCAPE="HTML"></link>
<language>en</language>
<description><TMPL_VAR name ESCAPE="HTML"> - <TMPL_VAR link ESCAPE="HTML"></description>
+ <TMPL_IF pubsubhubbub_hub>
+ <atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/>
+ </TMPL_IF>
<TMPL_LOOP Items>
<item>
Please sign in to comment.
Something went wrong with that request. Please try again.