First post

Published 06.03.2022 • Last modified 24.09.2023

This is the first post on my website. I made this website to host anything that I want to publish. My number one goal is to write about things that atleast one person somewhere might find useful. Solutions to problems that I have encountered, guides on languages/frameworks or just something cool I want to share.

Static site generation #

Static site generators output plain html/css/js, ready to be served anywhere. When designing this site I had to decide which framework to use. NextJS and Gatsby both provide static site generation and I already know React and Javascript so I naturally went for them first. They are the most popular static site generators, so why not use them?

A blog is a very simple website. There are no moving parts or live updates, just simple text and images. You don’t even need to update it that often. So why would you need hundreds of megabytes of NodeJS dependencies to render some simple HTML? I’d rather spend my time writing than configuring way too many plugins.

One alternative SSG I found was Hugo. It’s just one executable, no dependencies needed. One thing I immediately noticed was how fast it starts and rebuilds. A couple of milliseconds for hugo server, less than a hundred for building everything from scratch. I’ve not made my own templates yet, just copied this theme from Hugo Themes.

I’m using Github Actions to build and deploy the site. Currently the workflow takes just ten seconds to build AND deploy to the server!