swerc

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

commit 0e9a96072ee6563ed7c42adb7721445d81682a53
parent 6fbf76197a7a2c404e083f8cbd159e67d42ec913
Author: uriel@vm41.cat-v.org <unknown>
Date:   Fri, 12 Jun 2009 23:56:48 +0200

Optimization/fix to only pass the content of all blog posts at once to $formatter
This seems to some how fix a strange bug I have seen on my test setup, need to investigate more.
Diffstat:
Mapps/blagh/app.rc | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc @@ -68,9 +68,11 @@ fn blagh_body { echo '<div style="text-align:right">(<a href="index.rss">RSS Feed</a>|<a href="index.atom">Atom Feed</a>)</div>' + { # XXX Not sure why this fixes issues with blog setup, probably bug in fltr_cache! for(p in `{get_post_list $blagh_root^$blagh_dirs}) { l=`{echo -n $p|sed 's!'$sitedir^'/?(.*)([0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9])(/[^/]+/)!\2 /\1\2\3!'} sed '1s!.*![&]('^$l(2)^') ('^$l(1)^')!' < $p/index.md + } } | $formatter }