commit 2923a5152210ac67f448e1399b619db67e5fb203 parent b069352f716b1b5a0e5054dad2a521b0653c729d Author: uriel@vm41.cat-v.org <unknown> Date: Sun, 19 Jul 2009 03:27:26 +0200 Experimental support for Google's pubsubhubbub Diffstat:
M | apps/blagh/app.rc | | | 6 | ++++++ |
M | apps/blagh/atom.tpl | | | 4 | ++++ |
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc @@ -119,6 +119,12 @@ fn mkbpost { echo echo $bptext }> $ddir/$"n^$"bpid/index.md + + if(! ~ $"blagh_pubsubdub_hub '') { + # Experimental implementation of http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.1.html#anchor4 + ifs='' { p=`{echo $req_url|sed 's/new_post$/index.atom/'|./bin/contrib/urlencode.awk } + hget -p 'hub.mode=publish&hub.url='^$p' $blagh_pubsubdub_hub + } } status=$_status } diff --git a/apps/blagh/atom.tpl b/apps/blagh/atom.tpl @@ -22,6 +22,10 @@ updated = `{/bin/date --rfc-3339'=seconds' |sed 's/ /T/'} <feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0"> +% if(! ~ $"blagh_pubsubdub_hub '') { +% echo '<link rel="hub" href="'$blagh_pubsubdub_hub'" />' +% } + <link rel="self" href="%($base_url^$req_path%)"/> <id>%($base_url^$req_path%)</id> <icon>/favicon.ico</icon>