34 lines
743 B
Plaintext
34 lines
743 B
Plaintext
<?shp
|
|
if [ -z "$title" ]; then
|
|
echo >&2 "warning: ${_FILE#"$_SRCDIR"/} has no \$title"
|
|
else
|
|
[ -z "$TITLE" ] && TITLE=$title
|
|
[ -z "$TB_TITLE" ] && TB_TITLE=$title
|
|
fi
|
|
|
|
include header-unified.shp
|
|
|
|
echo "<main>"
|
|
|
|
# metadata processed before this will generate the titlebar
|
|
gen_titlebar
|
|
|
|
# we don't include the title with the markdown, so we do this
|
|
__lowdown <<EOF
|
|
# $title
|
|
EOF
|
|
|
|
# date below title for blog posts
|
|
[ -n "$ctime" ] && echo "<p>posted <time>$ctime</time></p>"
|
|
[ -n "$mtime" ] && echo "<p>modified <time>$mtime</time></p>"
|
|
|
|
# rest of stdin is the markdown
|
|
__lowdown
|
|
|
|
# sometimes we don't want to go back, most of the time we do
|
|
[ -z "$nobacklink" ] && echo "<p><a href="index.html">back</a></p>"
|
|
|
|
echo '</main>'
|
|
|
|
include footer.shp
|