Hugo website

I’ve been thinking about starting my own simple website just to have a place for putting some basic information about myself. I already had a site running, but it was a simple raw HTML with some Bootstrap CSS just with links to couple of projects that I already had hanging over the web.

That wasn’t enough. I wanted something manageable and simple. Using a blogging platform or an CMS seemed to be an overkill. One day a stumbled upon a simple static website management system called Hugo.

The system was easy, well documented, free and offered the possibility to create content using Markdown. Using Markdown seemed to be a succinct compromise between speed and customisability.

I’ve chosen the Coder theme as it seemed minimalistic. I do not want to overload the site with to much information, so the theme is perfect just to give some basic information out.

Also this type of system has a lot of tutorials avaliable over the web. It was really easy to configure the server using one of DigitalOcean’s tutorials. I just had to modify the git hooks/post-receive file to fit with my parameters as well as configure Apache to use HTTPS by default and voila! The site is up and running.

#!/bin/bash

WWW_DIR=/var/www
GIT_REPO=/home/mateusz/projects/hugo_site
WORKING_DIRECTORY=/home/mateusz/projects/hugo_working
PUBLIC_WWW=$WWW_DIR/maten.pl_hugo

# Checkout files from git
git --work-tree=$WORKING_DIRECTORY --git-dir=$GIT_REPO checkout -f
rm -rf $PUBLIC_WWW/*
# Generate hugo statis HTML files
/usr/local/bin/hugo -s $WORKING_DIRECTORY -d $PUBLIC_WWW 
rm -rf $WORKING_DIRECTORY/*
trap - EXIT