Hugo, Blogging, Gemini and Gopher

18 april 2023

Up until recently (yesterday, at time of writing), I was manging my sites on tilde.club by hand. I put a good bit of time to make my public_html look nice, but entirely neglected my public_gemini and public_gopher.

I was also using ttbq for my blogging. While it is a nice blogging engine (calling itself feels rather than blog posts), it’s not being actively developed anymore, and it doesn’t exactly have nice gopher/gemini support.

I needed something else. Something that can generate not just html, but gopher and gemini as well. And that’s where hugo comes in.

What’s a hugo?

Hugo is a static site generator. You give it some markdown files, you choose a theme, you run hugo, and out comes a website, with RSS feeds and xml sitemaps. It even generates list-pages, making it trivial to keep a blog: Just create a directory, place your blog entries as individual .md files, and you’re done. You can even add a _index.md to add some extra content to the list page.

But it gets even better. Hugo allows you to write your css in Sass, making my already bare-bones style.css even more simple and easy to read.

What was that about a theme?

Right, usually you start your hugo-site by selecting a theme. However, if you’re not planning on switching themes, you can skip that step by writing a few html templates and placing them under project_root/layouts/_default/.

What about gopher and gemini?

I did almost consider not using hugo and just writing my own, bare-bones static site generator for all my html, gophermap and index.gmi needs, but: Hugo supports custom output formats and custom filetypes.

You can just define text/gopher and text/gemini in your config file, add a few extra templates, and et voilĂ , free index.gmi files and gophermap files!

With the power of go-templates, you can even turn markdown reference links into go/gmi links. That’s why I’ve switched from inline-style links to reference-style.

Show, show!!

I’ve descided to version-control my site on tildegit, you’ll find it here