Skip to content
This repository
Browse code

emit PubSubHubbub atom:link tags in rss10 and rss20

  • Loading branch information...
commit b5c28795707ed95dbc5bf6011b617fd4b20bac03 1 parent 37d98f5
Matt Domsch mdomsch authored committed
2  planet/config.py
@@ -105,6 +105,8 @@ def define_tmpl_int(name, default):
105 105 define_planet('output_theme', '')
106 106 define_planet('output_dir', 'output')
107 107 define_planet('spider_threads', 0)
  108 + # set pubsubhubbub_hub to None to prevent it from being emitted
  109 + define_planet('pubsubhubbub_hub', 'http://pubsubhubbub.appspot.com')
108 110
109 111 define_planet_int('new_feed_items', 0)
110 112 define_planet_int('feed_timeout', 20)
1  planet/shell/tmpl.py
@@ -219,6 +219,7 @@ def template_info(source):
219 219 output['link'] = config.link()
220 220 output['owner_name'] = config.owner_name()
221 221 output['owner_email'] = config.owner_email()
  222 + output['pubsubhubbub_hub'] = config.pubsubhubbub_hub()
222 223 if config.feed():
223 224 output['feed'] = config.feed()
224 225 output['feedtype'] = config.feed().find('rss')>=0 and 'rss' or 'atom'
4 themes/common/rss10.xml.tmpl
@@ -4,12 +4,16 @@
4 4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 5 xmlns:foaf="http://xmlns.com/foaf/0.1/"
6 6 xmlns:content="http://purl.org/rss/1.0/modules/content/"
  7 + xmlns:atom="http://www.w3.org/2005/Atom"
7 8 xmlns="http://purl.org/rss/1.0/"
8 9 >
9 10 <channel rdf:about="<TMPL_VAR link ESCAPE="HTML">">
10 11 <title><TMPL_VAR name ESCAPE="HTML"></title>
11 12 <link><TMPL_VAR link ESCAPE="HTML"></link>
12 13 <description><TMPL_VAR name ESCAPE="HTML"> - <TMPL_VAR link ESCAPE="HTML"></description>
  14 + <TMPL_IF pubsubhubbub_hub>
  15 + <atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/>
  16 + </TMPL_IF>
13 17
14 18 <items>
15 19 <rdf:Seq>
5 themes/common/rss20.xml.tmpl
... ... @@ -1,11 +1,14 @@
1 1 <?xml version="1.0"?>
2   -<rss version="2.0">
  2 +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3 3
4 4 <channel>
5 5 <title><TMPL_VAR name></title>
6 6 <link><TMPL_VAR link ESCAPE="HTML"></link>
7 7 <language>en</language>
8 8 <description><TMPL_VAR name ESCAPE="HTML"> - <TMPL_VAR link ESCAPE="HTML"></description>
  9 + <TMPL_IF pubsubhubbub_hub>
  10 + <atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/>
  11 + </TMPL_IF>
9 12
10 13 <TMPL_LOOP Items>
11 14 <item>

0 comments on commit b5c2879

Please sign in to comment.
Something went wrong with that request. Please try again.