This is an example site meant as a starter pack for using Ox-Hugo to host a site. If you would like any help or have any comments, join the conversation on the Fediverse (Mastodon).
Install
Local
Install Ox-Hugo and Hugo locally alongside Emacs with Orgmode.
Container
A local install of hugo and ox-hugo are not required if you’re going to use a container based workflow.
Clone
Clone this repo and update hugo.toml
to match your information.
Theme
Theme is added a git submodule. Pick a theme you like and add it as a submodule and put the corresponding name in the hugo.toml
file. For this site, the theme is PaperMod: git submodule add https://github.com/adityatelange/hugo-PaperMod themes/PaperMod
Structure
To add content to the site on the content.org
:
- Add all posts to the Posts node of this file.
- The sections of the site are also defined as nodes.
- New sections can be added as new nodes in the same structure as Posts.
Running locally
To manually export the org document to md and server it locally with Hugo: export using C-c C-e H A
and run hugo with hugo server --buildDrafts --navigateToChanged --disableFastRender
. You can leave the hugo server running and see your changes on each export or auto-export on save.
This is a good way to verify everything is rendering as you intend, but is not a required step.
Publish
If you’re using Sourcehut Pages, update .build.yml
and push to your Sourcehut repo.