Tag: hugo
TIL: Publishing an Obsidian vault with Hugo March 6th, 2024
Here’s one way I figured out to publish an Obsidian vault as a static website using Hugo. This is a hard way: the easy way is to spend $100/yr on Obsidian Publish. My requirements I want to: Edit my content in Obsidian. Design and publish the web version with Hugo. I want to use Hugo but only because it’s the tool I know. I’m not sure it’s actually the best tool for this – as you’ll see below it has some warts that makes this more difficult than it might with other static site generators.…
TIL: Recursion in Hugo Templates March 6th, 2024
Turns out recursion is possible in Hugo templates by define-ing blocks and then “calling” them with template. (I had thought define was only for overriding blocks from parent templates, like Django). The use case was that I wanted to render a nested file tree, e.g. - dir/ - file1 - file2 - dir2/ - file3 - dir3/ - file4 - file5 And so here’s a slimmed down version of what I figured out:…
TIL: How to make a TIL section in Hugo January 14th, 2022
I want to add a TIL section to my blog, like Simon’s, for rough, unpolished, mostly technical stuff. It should be separate from the main blog post and feeds – only show up at /til. I sort of already know this but documenting the steps as a way of reminding myself and testing out a TIL section. Conceptually, creating new sections in a Hugo blog is easy: Hugo mirrors the output structure from the input structure.…