"
}'
}
fn gensidebar {
@{
cd $sitedir
menu .
}
}
fn sortedBlogPostList {
# the /./ is added so we can sort -t. and order only the file name
if (! ~ $#* 0)
ls $*^'/./' | grep '[0-9]+.*\.md$'| sort -r -t. +1
}
# Body
fn genbody {
if ( test -f $body.md )
markdown.pl < $body.md
if not if ( test -f $body.tpl )
template.awk $body.tpl | rc $rcargs
if not if ( test -f $body.html )
cat $body.html | /bin/sed '0,//d; /<\/body>/,$d'
if not if (~ $body *.html && test -f $body )
sed '0,//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 '
' `{basename `{basename -d $body}}'
'
echo '
'
ls -F `{ basename -d $body } | sed $dirfilter' s,^'$sitedir'/(.*),
'
}
if not if(~ $#blogDirs 0)
template.awk inc/404.tpl | rc $rcargs
# Technically wrong. Will spit out blog entries after 404 for /blog/foo, for instance.
if(! ~ $#blogDirs 0) {
if ( ! ~ $blogTitle '' )
echo '