From df5668add064f34395e64477ed198d0fed98d17e Mon Sep 17 00:00:00 2001 From: Uriel Date: Sun, 19 Jul 2009 03:27:26 +0200 Subject: [PATCH] Experimental support for Google's pubsubhubbub --- apps/blagh/app.rc | 6 ++++++ apps/blagh/atom.tpl | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc index 5d39368..1aea00f 100644 --- 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 index 8a5a08b..e31b32e 100644 --- a/apps/blagh/atom.tpl +++ b/apps/blagh/atom.tpl @@ -22,6 +22,10 @@ updated = `{/bin/date --rfc-3339'=seconds' |sed 's/ /T/'} +% if(! ~ $"blagh_pubsubdub_hub '') { +% echo '' +% } + %($base_url^$req_path%) /favicon.ico