From 86c17427d5f53f761188d393afa1f9b470aff9f8 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 4 Jun 2007 20:57:18 +0200 Subject: [PATCH] Create $extraHeaders for pages with blog entries. --- bin/controller.rc | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/bin/controller.rc b/bin/controller.rc index cd12e7e..3fe54da 100755 --- a/bin/controller.rc +++ b/bin/controller.rc @@ -12,13 +12,12 @@ site=$SERVER_NAME sitedir=sites/$site headers=inc/headers.tpl body=index -siteTitle='' -siteSubTitle='' -title='' template=_default sidebar=sidebar basedir=/gsoc/www baseuri=http://$site +for(i in siteTitle siteSubTitle title extraHeaders) + $i = '' # Title fn gentitle { @@ -117,11 +116,24 @@ for ( i in '' $args ) { } template=$sitedir/$template.tpl -body=$sitedir/$body if (! ~ $#sidebar 0) sidebar=tpl/_inc/$sidebar.tpl -if (test -d $body) + +body=$sitedir/$body +rssuri=$uri +if (test -d $body) { body=$body/index + rssuri=$rssuri/ +} +rssuri=`{cleanname `{basename -d $uri}^/index.rss} +rssuri=$baseuri$rssuri + +if(! ~ $#blogDirs 0) + extraHeaders=$"extraHeaders ^ \ + ' +' + +echo hesd: $extraHeaders # RSS fn statpost {