Notes on Notes

· 3 minute read

I’ve been meaning to put together a little blog of sorts to document some of the projects I’ve been working on for some time now.

I kinda started setting something up a couple of times, but I’m a perfectionist and if there’s one thing I’m great at it’s getting lost in details. That lead to me not being happy with the setup, changing setups multiple times, and in the end not publishing anything.

So yesterday I set myself the challenge of spending no more than 24 hours to set up this new site. Below are some notes on what I decided to use and how it’s set up.

Static Site

As a long-time fan and advocate of static sites, this is no different. Hugo was the easy choice this time, as I wanted it to be fast, flexible for potential future improvements, and I wanted to just choose a theme without having to customize it much or at all.

Generally it works well. It has a ton of flexibility that I don’t know anything about (yet), and while I did have to dig through the docs a bit in the end I got it up and running quite quickly. I’m not a big fan of the {{ curly }} template language, but I have used it a bit in Go and know some of its quirks.

Theme

The base theme is called etch, and as you can probably tell it’s pretty simple. I adjusted some styling and while I would like to completely rewrite refactor it, that’s not the goal of this excercise. It’s fine.

No JavaScript, no tracking. I’m hosting the fonts myself but I’m not sure yet if I’ll keep them.

It also applies dark mode styles automatically based on your system preferences. I’d like to add a toggle, but, well, 24h limit.

Tooling

I wrote a small Makefile to run the necessary commands.

.PHONY: dev build deploy

# run dev server with live reload
# -D includes drafts
dev:
  hugo serve -D

# create production build
# hugo doesn’t clear the output folder so make
# sure the output doesn’t include old files
build:
  rm -rf public
  hugo

# create fresh build and deploy it to production
# by syncing the output to the production host
deploy: build
  rsync -avze 'ssh' \
    --delete \
    ./public/ \
    user@host:/path/to/html

Hosting

Previously I had a tiny site set up on GitHub pages, but as privacy and data protection have been a big focus of mine in recent years I wanted this site to be hosted in Germany.

I used to have an uberspace way back when and this was a good opportunity to come back to it. It’s still great.

The only configuration I did was setting up the domain. SSL is handled through Let’s Encrypt and I’m just using the default Apache webserver. I normally use Caddy in production, but the added complexity is simply not necessary here (especially since SSL already works).