swerc

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

commit 0a14f39cbf7236e475e3c707b5b585dbf03ed426
parent 7ba7888718fd0f1d89c4dc6de9143ee522563e30
Author: uriel@soma <unknown>
Date:   Tue, 20 Jan 2009 09:06:28 +0000

Fix display of individual blog posts.
Diffstat:
Mapps/blagh/app.rc | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc @@ -9,10 +9,9 @@ fn blagh_init { blagh_url=$base_uri^$blagh_root_path blagh_root=$sitedir^$blagh_uri - if(~ $req_path */[0-9][0-9][0-9][0-9]/ */[0-9][0-9][0-9][0-9]/[0-9][0-9]/ */[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/) - status='Use default handler' - - if not if(~ $req_path */index */) { + # XXX This is a hideous hack, blogs in dirs that match the number patern wont work, and dirs inside posts (eg., comments) wont work either. + # The problem is how to find out the 'root' of this blog, blaghDirs is useless for that. + if(~ $req_path */ && ! ~ $req_path */[0-9][0-9][0-9][0-9]/ */[0-9][0-9][0-9][0-9]/[0-9][0-9]/ */[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/*) { handler_body_main=blagh_body u=$blagh_uri'index' extraHeaders=$"extraHeaders ^ \ @@ -29,7 +28,6 @@ fn blagh_init { fn blagh_setup_feed_handlers { handler_body_main=NOT_USED_by_blagh_feeds - headers=() # Headers included in master tpl res_tail=() master_template=_apps/blagh/$1 }