I've created a git + hooks + webservice setup so I can edit from anywhere with an editor and access to git, using a howto called A web-focused Git workflow by Joe Maller. I needed to configure some global settings in the Main git to prevent is from yelling about merge handling, but that was it.

I run the following build.sh script, which takes care of everything for me. I also added a .gitignore for vim temp files, just to be sure.

#!/usr/bin/env bash

set -e
set -u

mdfiles=(*\.md)
for mdfile in ${mdfiles[*]}; do
  mdfile="$(basename -- "${mdfile}")"
  mdbase="${mdfile%.*}"
  echo "processing ${mdfile} ..."
  # index.md is special (currently just mastodon verification link)
  if [ "${mdfile}" = "index.md" ]; then
    pandoc -V --standalone --from markdown+yaml_metadata_block -i "${mdfile}" --standalone -o "${mdbase}.html" --highlight-style=pygments -H "rel.html" --lua-filter=include-code-files.lua --lua-filter=include-files.lua

  else
    pandoc -V --standalone --from markdown+yaml_metadata_block -i "${mdfile}" --standalone -o "${mdbase}.html" --highlight-style=pygments --lua-filter=include-code-files.lua
  fi
done

git add .
git commit -m "autobuild commit"
git push