Another very nice ox-hugo feature is its “One post per Org subtree” mode (
https://ox-hugo.scripter.co/#screenshot-one-post-per-subtree), in which you keep your entire post tree (in fact, you could keep your entire website) in a single Org file. I was skeptical about this at first (who wants to keep *everything* in a single file), but in practice it works very well, and allows you to have tags/categories or other attributes per subtree, so you don’t have to repeat them on every post.
That's the primary reason why I started working on ox-hugo. I couldn't bear the manual labor of copy/pasting/syncing of front-matter across separate Markdown files. I always suggest people to try the "per-subtree blogging flow" because Org subtree structure, property and tag inheritance so much reduce that manual effort. See here on how various properties and tags translate to Hugo front-matter ->
https://ox-hugo.scripter.co/doc/org-meta-data-to-hugo-front-matter/#for-subtree-based-exports.
If you really want to keep each post in a separate file, that is doable as well. The ox-hugo website has a lot of very useful information.
Finally, you can do the transition gradually - for my website, I had years of accumulated Markdown files from my adventures with Jekyll, Octopress and later Hugo. Those are still in place, and I have started only putting my new posts in an org file which ox-hugo processes. Since those are converted to Markdown files, they end up alongside the old hand-crafted files, and Hugo just processes them all together.
That too! Looks like you hit all the awesome points :) My
scripter.co site source also contains of few dozen old Markdown posts. New stuff is written in Org and exported to Markdown using ox-hugo which live right along the old Markdown content... and everything just works.
I really recommend ox-hugo, Kaushal has done a fantastic job and he is also really helpful and responsive with questions.
Thanks for this heavy recommendation. Working on this project and supporting/making it more robust based on user feedback has been great pleasure.
Yes! The list of contributors on that Real World Examples page is growing day by day.
And finally, some clarification about things mentioned in other parts of this thread:
- Using Hugo does *not* require you to know the Go language. You just learn the Go templating syntax. And that too, if you want to start by tweaking and designing Hugo themes. You can always pick one of the 200+ Hugo themes, and get your blog started, and then revisit writing your own theme at a later time.
- It doesn't even require you to install the Go toolchain (though it's not difficult, you just unzip an archive).
Apart of the binary-static-ness of the hugo static site generator, another reason it appealed to me is that the Go templating syntax feels a bit /lispy/. For example, I use this:
{{ $.Scratch.Set "__repo_updated_time" (index (index (index (index $repo_json "commit") "commit") "committer") "date") }}
In summary, ox-hugo allows you to use the best tools for each task: (1) content writing in Org, and (2) mass HTML/RSS/JSON/etc. generation using Hugo. The former wins in having a concise Org document where the Org features of macros, tag/property inheritance, Org babel, etc. can be leveraged. The latter wins in creating the *whole* site containing literally hundreds of pages (posts, lists, feeds, search index, JSON feeds, aliased pages, whatnot) in a matter of *a second or two*.
Kaushal