E_NO_SUCH_BLOG

Programming, philosophy, pedaling.


blog.yossarian.net is now self-hosted

Mar 15, 2018

Tags: meta

After 3+ years on GitHub Pages (and as many years without HTTPS), blog.yossarian.net is now self-hosted and fully encrypted.

The setup was surprisingly simple:

#!/usr/bin/env bash

set -eo pipefail

installed() {
  cmd=$(command -v "${1}")

  [[ -n "${cmd}" ]] && [[ -f "${cmd}" ]]
  return ${?}
}

installed jekyll || { echo "Missing jekyll"; exit 1; }
installed rsync || { echo "Missing rsync"; exit 1; }

jekyll build

[[ -d _site/ ]] || { echo "No _site dir?"; exit 1; }

rsync -avz --progress _site/ william@yossarian.net:/var/www/html/blog.yossarian.net/

Running deploy.sh is one extra step compared to the automatic build and deployment process provided by GitHub Pages, but it's a trivial one. It also gives me more control over my site's build process — I'm no longer bound to GitHub's transition away from redcarpet support (or other future changes).

- William