ref: a65e54f405120def2c05cd66de461e3893bb3711
parent: 12d625c8e0c55c88347fd548b0ae19c3c41ebfe9
author: uriel <uriel@engel.se.cat-v.org>
date: Sat Jun 9 19:36:37 EDT 2007
New embeded handling of .html files Remove old sh gensitemap Allow 'Blog' as well as 'blog'
--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -21,10 +21,10 @@
# Title
fn gentitle {
- echo '<h1 class="headerTitle"><a href="/">' ^ $"siteTitle ^ '<span id="headerSubTitle">' ^ $"siteSubTitle ^ '</span></a></h1>'
+ echo '<h1 class="headerTitle"><a href="/">' ^ $"siteTitle ^ ' <span id="headerSubTitle">' ^ $"siteSubTitle ^ '</span></a></h1>'
}
-dirfilter = '/\/[._]/d; s,^\./,,; s,\.md$,,;'
+dirfilter = '/\/[._]/d; s,^\./,,; s,\.md$,,; s,\.html,,;'
# Sidebar
fn menu {
@@ -77,7 +77,11 @@
markdown.pl < $body.md
if not if ( test -f $body.tpl )
template.awk $body.tpl | rc $rcargs
- if not if ( ~ $body */blog/index */blog//index && ~ $#blogDirs 0 )
+ if not if ( test -f $body.html )
+ cat $body.html | /bin/sed '0,/<body>/d; /<\/body>/,$d'
+ if not if (~ $body *.html && test -f $body )
+ sed '0,/<body>/d;/<\/body>/,$d' < $body
+ if not if ( ~ $body */[bB]log/index */[bB]log//index && ~ $#blogDirs 0 )
blogDirs = `{basename -d $body}
if not if(~ $body */index && ~ $#blogDirs 0) {
echo '<h1>' `{basename `{basename -d $body}}'</h1>'
--- a/bin/gensitemaptxt.sh
+++ /dev/null
@@ -1,5 +1,0 @@
-#!/bin/sh
-for d in sites/*/; do
- find $d -name '*.md'|sed -e 's/\.md$//' -e 's,/index$,/,' -e 's,^sites/,http://,' > $d/sitemap.txt
-done
-