I forget how fun ox-hugo is
ox-hugo is “an Org exporter backend that exports Org to Hugo-compatible Markdown (Blackfriday) and also generates the front-matter (in TOML or YAML format).”
It’s more fun than it sounds.
I’ve used ox-hugo before, but I end up either drifting away from Org mode and/or Hugo and forget what a powerful combination ox-hugo, Org mode, and Hugo can be.
The great thing is that I have all my posts in a single Org file, each as its own heading. Each heading is rendered as individual Markdown files with Hugo-compatible frontmatter.
A few highlights:
- I use an org timestamp for the entry date and add posts.org to my agenda files so I see what I posted on a given day in my org agenda.
- I have a yasnippet that helps me fill in the post metadata
- Posts are rendered automatically when saving via local variable:
# eval: (org-hugo-auto-export-mode)
The posts.org frontmatter looks like this…
|
|
And then an individual post heading looks like this…
|
|
Author Jack Baty
LastMod 2021-05-26