How To Host This Site
Using:
Log into your server:
ssh $USERNAME@$SERVER
You may need to install Jekyll dependencies:
apt install ruby ruby-dev build-essential
Install Jekyll:
gem install bundler jekyll
Create a new Jekyll site:
jekyll new $BLOGNAME
Create an empty Git repository:
git init --bare ~/$BLOGNAME.git
Add a Git hook file:
This will update the site when new content is added.
echo \
'#!/bin/bash -l
GIT_REPO=$HOME/$SITE.git
TMP_GIT_CLONE=$HOME/tmp/$SITE
PUBLIC_WWW=/var/www/html
git clone $GIT_REPO $TMP_GIT_CLONE
jekyll build --source $TMP_GIT_CLONE --destination $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit' \
> ~/$SITE.git/hooks/post-receive
Make the file executable:
chmod 775 ~/$SITE.git/hooks/post-receive