New embeded handling of .html files

Remove old sh gensitemap

Allow 'Blog' as well as 'blog'
This commit is contained in:
uriel 2007-06-09 23:36:37 +02:00
parent 1ebac62918
commit dd16b71bea
2 changed files with 7 additions and 8 deletions

View File

@ -21,10 +21,10 @@ for(i in siteTitle siteSubTitle title extraHeaders)
# Title # Title
fn gentitle { 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 # Sidebar
fn menu { fn menu {
@ -77,7 +77,11 @@ fn genbody {
markdown.pl < $body.md markdown.pl < $body.md
if not if ( test -f $body.tpl ) if not if ( test -f $body.tpl )
template.awk $body.tpl | rc $rcargs 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} blogDirs = `{basename -d $body}
if not if(~ $body */index && ~ $#blogDirs 0) { if not if(~ $body */index && ~ $#blogDirs 0) {
echo '<h1>' `{basename `{basename -d $body}}'</h1>' echo '<h1>' `{basename `{basename -d $body}}'</h1>'

View File

@ -1,5 +0,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