Skip to main content

Baty.net

A blog about everything by Jack Baty 👋

Tag: Hugo

Wednesday, January 10, 2024

After yesterday’s Kirby->Hugo-Kirby debacle, I’ve been thinking about why I spend so much time farting around with and on my blog. Fair question, and one I don’t really have an answer to. I guess it’s my little place on the internet and I like to have the furniture arranged just so. But “just so” changes all the time, so I keep trying new configurations. It’s fun. Also useless, and nobody but me cares, but still.

Editing Hugo’s Markdown directly (not using ox-hugo)

I have been wondering if the benefits of using ox-hugo just so I can write posts using Org-mode format is worth the extra layer of abstraction. I prefer Org-mode to Markdown, but Markdown is fine. In fact, Markdown-mode makes editing Markdown in Emacs quite pleasant. Ox-hugo is a great package, but increasingly seemed like a clever but unnecessary abstraction. One of its best features is that it makes creating new posts super easy. I never liked using the Hugo CLI, so ox-hugo solved that problem.

Marking a region for highlighting in Hugo posts

You’ll notice that I highlight short phrases in many of my daily post entries here. I think this makes it easier to scan things later. The HTML markup for this is just a styled <mark> tag wrapping the text to be highlighted.

I write my posts in Org-mode and convert them to Hugo-compatible Markdown using ox-hugo. The path from Org-mode to HTML for this is a little convoluted, so I cheat and use a macro to generate the markup.