Source code of this site.

This is what I use to generate my site. It is licensed under the CC0 so do whatever you want with it.

#!/usr/bin/env bash

for file in `find . -name '*.md'`; do
    output=${file::-3}.html
    if [[ `date -r "$file" "+%s"` -le `date -r "../$output" "+%s"` ]]
    then
        echo "Skipping $file"
        continue
    fi
    mkdir -p ../$(dirname $output)
    echo Generating $output from $file
    title=$(sed -nr 's:^# (.*):\1:p' $file | head -n 1)
    if [[ "$title" == "" ]]
    then
        title="Demindiro"
    fi
    cat << EOF > ../$output
<!DOCTYPE html>
<head>
<title>$title</title>
`cat head.html`
</head>
<body contextmenu="kawaiimenu">
<!-- This is so cool! -->
<menu type="context" id="kawaiimenu" style="display:none">
    <menuitem label="Hi! ( ^-^)/"></menuitem>
</menu>
`cat navigation.html`
<main>
`pandoc $file`
</main>
<footer>
    <span>The content on this page is licensed under the CC BY-ND 4.0</span>
    <a style="float:right" href="/md/$file">Source</a>
</footer>
</body>
EOF
done;