From 9604018c4273b1af617c09d829c8f61003cb51a4 Mon Sep 17 00:00:00 2001 From: Uriel Date: Thu, 12 Feb 2009 22:03:57 +0000 Subject: [PATCH] Add blog header and rss/atom feed links, and fix a bug for agregated blog dirs. --- apps/blagh/app.rc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc index 7321c15..83777f4 100644 --- a/apps/blagh/app.rc +++ b/apps/blagh/app.rc @@ -54,8 +54,13 @@ fn blagh_setup_feed_handlers { } fn blagh_body { + if (! ~ $"blogTitle '') + echo '

'$"blogTitle'

' + + echo '
(RSS Feed|Atom Feed)
' + for(p in `{get_post_list $blagh_root^$blagh_dirs}) { - l=`{echo -n $p|sed 's!'$sitedir^$req_path'./([0-9]+/[0-9][0-9]/[0-9][0-9])(.*)!\1 ./\1\2!'} + l=`{echo -n $p|sed 's!'$sitedir^'/?(.*)([0-9]+/[0-9][0-9]/[0-9][0-9])(/[^/]+/)!\2 /\1\2\3!'} sed '1s!.*![&]('^$l(2)^') ('^$l(1)^')!' < $p/index.md } | $formatter }