Skip to content

Commit

Permalink
add atom:link ref="self" tags in rss10.xml and rss20.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Domsch authored and rubys committed Jun 15, 2010
1 parent b5c2879 commit 1f5c9ce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions planet/shell/tmpl.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -256,8 +256,10 @@ def run(script, doc, output_file=None, options={}):
tp.set(key, value) tp.set(key, value)


if output_file: if output_file:
basename = os.path.basename(output_file)
reluri = os.path.splitext(os.path.basename(output_file))[0] reluri = os.path.splitext(os.path.basename(output_file))[0]
tp.set('url', urlparse.urljoin(config.link(),reluri)) tp.set('url', urlparse.urljoin(config.link(),reluri))
tp.set('fullurl', urlparse.urljoin(config.link(),basename))


output = open(output_file, "w") output = open(output_file, "w")
output.write(tp.process(template)) output.write(tp.process(template))
Expand Down
3 changes: 3 additions & 0 deletions themes/common/rss10.xml.tmpl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<TMPL_IF pubsubhubbub_hub> <TMPL_IF pubsubhubbub_hub>
<atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/> <atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/>
</TMPL_IF> </TMPL_IF>
<TMPL_IF fullurl>
<atom:link rel="self" href="<TMPL_VAR fullurl ESCAPE="HTML">" type="application/rss+xml"/>
</TMPL_IF>


<items> <items>
<rdf:Seq> <rdf:Seq>
Expand Down
3 changes: 3 additions & 0 deletions themes/common/rss20.xml.tmpl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<TMPL_IF pubsubhubbub_hub> <TMPL_IF pubsubhubbub_hub>
<atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/> <atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/>
</TMPL_IF> </TMPL_IF>
<TMPL_IF fullurl>
<atom:link rel="self" href="<TMPL_VAR fullurl ESCAPE="HTML">" type="application/rss+xml"/>
</TMPL_IF>


<TMPL_LOOP Items> <TMPL_LOOP Items>
<item> <item>
Expand Down

0 comments on commit 1f5c9ce

Please sign in to comment.