Scott Wolchok

How This Site Is Made

Posted at — Jan 14, 2021

TLDR: Hugo, GitHub, Netlify.

Putting writing on a website in 2021 is surprisingly pleasant, despite a few glitches.

I wanted to have a plain old static site. I can write raw HTML well enough, and I knew about Bootstrap, but that still seemed like too much work. Instead, I looked at a couple overviews of static site generators, and I ended up picking Hugo as the one most fitting my sensibilities. You write pages and posts in Markdown, run Hugo, and get static HTML/CSS/JS out. It has a built-in web server with hot reloading so that you can run hugo server, edit your site, and see it in your browser right away. The builds are really fast; I am using a potato cheap Chromebook from 2018 and the site still builds in less than 100 ms.

Now, let’s talk about hosting. At first, I thought that I was going to host the site out of an Amazon S3 bucket or GitHub Pages, but then I read some recommendations for Netlify, and I’m glad I went with them instead. Setup was straightforward (though they want an ALIAS or ANAME DNS record, which is some kind of Amazon Route 53 thing that Google Domains doesn’t support, so I had to fiddle with Google Domains' control panel to set a plain A record), and included automatic SSL certificate provisioning with Let’s Encrypt. Writing a netlify.toml is a bit fiddly, but there is a nice tutorial from the Hugo folks. Now, every time I push the site source code to a private GitHub repository, Netlify automatically builds and pushes to production.