#!/bin/sh header=' ' genhtml() ( cd "$1" . ./meta.sh exec 1>index.html # Header echo "$title" echo "" echo "$header" [ "$1" != . ] && echo "$blog_title
" # Body pandoc *.md # Footer echo "
From: $author, $date" ) for d in *; do [ -d "$d" ] && genhtml "$d" done genhtml . # Fix for mastodon. sed '/mstdn/s/href=/rel="me" href=/' index.html >xx && mv xx index.html