2 minutes
Using Org-Mode with Hugo
Summary
This page is a summary of stuff I’ve learnt about using org-mode with Hugo to publish webpages. It is still very much in flux.
Starting Points
I use emacs a fair bit and org-mode a bit so I’m interested in using an org-mode flow. Because I use hugo to generate my website at the moment, use of a package called ox-hugo seemed the most convenient.
Links
Some resources I’ve found so far are:
- Andrey Listopadov’s setup
- Got me up and running initially.
- Diego Vicente’s setup
- Dr. Peter Prevos’ setup
- Handy details on front matter.
- Nice snippet on setting up a lastmod timestamp.
- Note that he doesn’t use ox-hugo.
Adding a new post
- Go to the home directory and add a new file ‘post_XX.org’.
- Add a preamble of #commands that can be copied from an old post.
- Write your post.
- Use of the command C-c, C-e, H, H.
- This invokes ox-hugo that will generate the markdown file.
- Go to a terminal and invoke ‘hugo server -D’ from the home directory.
- Marvel at the results located at ‘https://localhost:1313’.
Adding Images and PDFs.
- Put the images you’re interested in, in the static directory.
- Then you can reference them using the file: prefix and various square brackets.
Links
Adding Tables
Firstly we can add a table by use of comma seperated values.
Themes
I’m currently using the hello-friend-ng theme.
Things to figure out
- How do I add little hover notes?
- How do I change the theme properly?