Steps for building content folder from org files using org-roam

Tools used

  1. org-mode
  2. org-roam
  3. Using ox-hugo
  4. Ninja
  5. python

Set up

  1. Install ninja: Ninja build tool
  2. Run ./convertOrgToMd.py. Do this if you see issues with python: dos2unix convertOrgToMd.py
  3. Install hugo. https://gohugo.io/getting-started/quick-start/
  4. Install pagefind. PageFind
  5. Run ./build.sh. Do this if you see issues with it: dos2unix build.sh

Permission issues

bash: ./example.sh: Permission denied

To solve this issue, we need to give ourselves execution privileges: chmod u+x example.sh

Project layout

The org files are in the directory org_files

build.py exports them into markdown format using ox-hugo.

init.el has the minimal config required to export the org files using ox-hugo.

jethrow-publish.el has a couple of utility functions that build.py uses.

Other options that I tried

  1. I tried doing this using Rust and Java.
    1. https://github.com/explorer436/programming-playground/blob/main/rust-playground/regenerate-hugo-md-files/src/main.rs
  2. But none of them are as fast as doing it with ninja build tool.

Reading material

  1. https://blog.jethro.dev/posts/automatic_publishing/
  2. https://github.com/jethrokuan/braindump/tree/df28c5c0856df6203580e763afd4dbde2c2c8279