From c950f9118139e0f5bda8cd8c665742b1bbde29fb Mon Sep 17 00:00:00 2001 From: Uriel Date: Sat, 5 Jul 2008 04:55:56 +0200 Subject: [PATCH] Move .txt handling belog site-wide .tpl's which was allowing the .txt sitemaps to shadow the html version --- bin/controller.rc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/controller.rc b/bin/controller.rc index e4f007f..3cdcde4 100755 --- a/bin/controller.rc +++ b/bin/controller.rc @@ -102,13 +102,6 @@ fn genbody { } if not if (test -f $body.tpl) template.awk $body.tpl | rc $rcargs - if not if (test -f $body.txt) { - echo '
'
-	# XXX Insering a blank line between lines in input is good for fortunes.txt, but probably not for other .txt files
-	# XXX Words are not broken, even if they are way beyond 82 chars long
-        cat $body.txt |sed 's/$/\n/g; s//\</g' |fmt -l 82 -j
-        echo '
' - } if not if (test -f $body.html) cat $body.html | /bin/sed '0,/<[Bb][Oo][Dd][Yy][^>]*>/d; /<\/[Bb][Oo][Dd][Yy]>/,$d' if not if (~ $body *.html && test -f $body) @@ -117,6 +110,13 @@ fn genbody { blogDirs = `{basename -d $body} if not if (test -f pub/^$reqpath^.tpl) template.awk pub/^$reqpath^.tpl | rc $rcargs + if not if (test -f $body.txt) { + echo '
'
+	# XXX Insering a blank line between lines in input is good for fortunes.txt, but probably not for other .txt files
+	# XXX Words are not broken, even if they are way beyond 82 chars long
+        cat $body.txt |sed 's/$/\n/g; s//\</g' |fmt -l 82 -j
+        echo '
' + } if not if(~ $body */index && ~ $#blogDirs 0) { echo '

' `{basename -d $body|sed -e 's,.*//,,g' -e 's,/$,,' -e 's,/, / ,g' } '

' echo '