ArtifiShell Intelligence

Pandoc Bash Blog


This blog has seen very little love for a while; not because I had no ideas what I could write about, but because I didn’t do it.

This must have been due to “not invented here” syndrome as I was using a Jekyll Now based blog; today, I’ve started writing my own little blog generator. So far, it’s a shell wrapper around Pandoc and does little more than this:

for f in *.md; do
    pandoc \
        --from=markdown \
        --to=html \
        --output="artifacts/${f/}" \
        --standalone \

There’s a little snippet that builds an index page:

    printf '%s\n\n' "# Benjamin's blog"
    for f in ????-??-??-*.md; do
        read -r _ title < "$f"
        printf -- '- [%s](%s)\n' "$title" "${f/}"
    done | tac
} >

and that’s it! The rest is some Git contortions to get the generated files into the right branch, assuming a blog published on GitHub pages. The Pandoc defaults are quite alright, but I’m looking forward to endless fiddling with it. I’ll spin the generator out into its own repository eventually, but I’ll keep track of the progress here.