swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit 7f3c29c4028daba71e374298bc5669d785cd6af9
parent 7ccb430d81bc3d193ad7ad6e7830730380c3fcf0
Author: uriel@soma <unknown>
Date:   Thu, 12 Feb 2009 22:03:57 +0000

Add blog header and rss/atom feed links, and fix a bug for agregated blog dirs.
Diffstat:
Mapps/blagh/app.rc | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 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 '<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 }