Moved the blog from 11ty to Hugo
What should you do when you’re busy and have been spending too much time on your blog lately? Why, dive head first into a completely unnecessary SSG migration, of course!
I had Hugo on the brain last night for somewhat valid, somewhat flimsy reasons:
- I used Hugo in the past and liked it.
- 11ty’s fast, but Hugo’s wicked fast.
- I’ve been writing more Golang code lately.
- While I’m fine with JavaScript and enjoy TypeScript, relying on npm feels dirty these days with all the supply-chain attacks. Hugo is a single, batteries-included binary that does not rely on third-party packages.
With these thoughts in mind, I dipped a toe back into the Hugo pond this morning, liked the feel of it, and before long was wild-eyed and neck-deep in migration. It’s now about 3:50 pm, and I think most of the core stuff is working in Hugo.
Here are my very hasty thoughts on what I like better:
- See above re: single binary.
- See above re: wicked fast.
- The local dev server has a flag that controls whether drafts are included or not. I don’t think 11ty has this. I had to write some custom code to be able to run the dev server but exclude drafts locally.
- The dev server seems to reliably start and stop in an instant. The 11ty server gets stuck sometimes, taking a long time to exit.
- I love that Hugo leans hard into partials. You can accomplish the same thing with 11ty, but it felt less obvious the right way to do it.
- I like that Hugo’s shortcodes are stored in html files instead of JS functions.
- Hugo has native blocks! 11ty says you can use the Nunjucks template-inheritance feature, but it doesn’t work with 11ty’s native layout flow. In my experience, anyway.
- Dates make more sense to me. 11ty forces dates for everything, and it’s really hard to tell whether a page has an explicit date or just the auto-computed date that 11ty imposes on it. I burned a bunch of time wrestling this because I wanted my notes to be undated.
- Nitpicking, but defining the nav menu in the
hugo.tomlconfig file is clearer to me than how 11ty does menus.
11ty’s great, of course. Hugo’s just more my vibe so far.
I’m out of time and gonna hit the deploy button. Fingers crossed.