ref: 58643279648893dc4c80bb904bbd5bdaad8e6d62
parent: 7217875a4efdff19fb3a58eb70ca1063cd35757e
author: sl <uriel@engel.se.cat-v.org>
date: Thu Feb 12 17:03:57 EST 2009
Add blog header and rss/atom feed links, and fix a bug for agregated blog dirs.
--- a/apps/blagh/app.rc
+++ b/apps/blagh/app.rc
@@ -54,8 +54,13 @@
}
fn blagh_body {
+ if (! ~ $"blogTitle '')
+ echo '<h1>'$"blogTitle'</h1>'
+
+ echo '<div style="text-align:right">(<a href="index.rss">RSS Feed</a>|<a href="index.atom">Atom Feed</a>)</div>'
+
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
}