Updates to my ox-hugo publishing setup
New posts are created using the following Org mode capture template.
This is nearly identical to the one offered in the ox-hugo docs except that I prepend an ISO date as part of the exported file name.
New posts are added to the
Posts->2020 heading in
One of my least favorite things about using static site generators is
that images are harder to manage. I’m letting org-attach handle most of it. Image files
dragged into posts.org are copied to
./content-org/attach/ and automatically
renamed and linked in the post. I use the following setting:
(setq org-attach-id-dir "./attach")
When exporting the Markdown file, ox-hugo puts any attachments in
./static/ox-hugo/. At first I was put off by this since all my other images
./static/img/YYYY, but I came to realize that it makes sense to isolate
them in their own directory so it’s easy to spot that they are managed by
ox-hugo. I may change this at some point.
I sometimes feel that the extra level of abstraction introduced by going from Org->Markdown->HTML is a bit much, but it sure is clever and makes writing and publishing easy and pleasant.