My learnings (so far) from using static site generators
I’m launching a project called Better Gut Digest. I initially wanted to host my website with Substack, but I need more flexibility and control, so I decided to DIY. I considered Wordpress and Ghost — both the paid/managed versions and the roll-your-own options, but I ultimately landed on using a static site generator because I wanted something simple and low cost.
As the name suggests, static site generators are software tools designed to generate static html sites. In order to get a blog running with an SSG, the developer needs to provide the following:
HTML templates: these define the look and feel of your webpages
Data files: these files spell out global variables that you can refernce in your HTML templates via a templating language (e.g. {{ title }} will insert the blog’s title into an HTML template)
Configuration files: defines how your static site generator actually builds your site (i.e. generates your production-ready HTML outputs)
Markdown posts: these are the actual blog posts
Static assets: these are the files for images or other media used in the blog posts or other parts of the website
Functional Diagram of how SSG works
So far I’ve tried out Jekyll, Hugo, and Eleventy. I’ve deployed them both locally and to Netlify. I’ve tried attaching a CMS. I’ve tried building from a template vs coding from scratch. My takeaway from all of this: even the simplest setups are more complex that I thought.
I may change my mind, but I think I’m going to go with Eleventy and I’m going to code it from scratch in the beginning to get a feel for how it works — then I’ll probably switch to an out-of-the-box template that looks better than what I can make. I’ll deploy the site to Netlify (which is so much simpler for me than deploying directly on AWS or GCP which is what I’ve done for previous projects like LatLongExcel.com, Whatinmyfridge.ai, and Groceryplaylist.com). I also will import the project to Netlify from Github so that any time I push a change to Github, my site will be rebuilt and redeployed.
Going through this setup of making a DIY blog has been harder than I thought, but it’s been a great learning experience. And it’s going to be lower cost and more flexible. And if I do a good job, I’ll also manage to keep it low maintenance and easy for someone to pick up if I no longer become directly involved in the management of it.
update (9/21/24): I ended up going with this Eleventy theme (neat-starter) — it has a one-click deploy to Netlify option and is preconfigured with a CMS. This basically ticked all my boxes while still being simple and easy to navigate.