This repo contains the public documentation for Open mSupply, hosted on docs.msupply.foundation. Documentation is stored in markdown files and built using zola
This process has become slightly convoluted because zola to beginwith, but further because we use an outdated version of zola and installing it locally is no longer straightforward. We must use no more than version 17.2 of Zola, not 19.2 which is the latest as of writing.
Git is a tool for managing codebases, and our docs are managed like a codebase. Github Desktop is an app that makes 99% of what you need to do with git actually user friendly, rather than user nightmare. https://desktop.github.com/download/
In this webpage, near the top-ish right there is a green "Code" button. Click it and select "Open in Github Desktop".
Follow the prompts and let it clone the repo to your machine.
- Clone Zola the same way as above with "Open in Github Desktop": https://github.com/getzola/zola
- In github desktop*, click on the "History" tab then scroll down and select the commit that is tagged
v0.17.2
, right click and choose "Checkout Commit" - Install rust. You're a programmer Harry! https://www.rust-lang.org/tools/install
- Open a terminal in your Zola repo directory. You can do this in github desktop in the "Repository" Menu "Open in Terminal", or navigate a terminal window there if you're in the know.
- Run the command
cargo install --path . --locked
- this will use rust to build zola and install it - Run
Zola --version
and pray that you are on0.17.2
*Or cause you're a dev and cbf clicking around in github desktop just do:
git clone https://github.com/getzola/zola.git
cd zola
git checkout v0.17.2
cargo install --path . --locked
zola --version
- Download the terminal executable program for your OS from https://github.com/getzola/zola/releases/tag/v0.17.2
- Extract it and copy
zola
file to/usr/local/bin/
(pressingcmd+shift+.
in a finder window will toggle showing hidden folders 🙂) - In a terminal try run
zola
. It'll complain about malware, at which point you can allow it in settings - Run
zola --version
and if it says 0.17.2 you're good to go!
- Open a terminal in the
msupply_docs
directory on your machine - Run
zola serve
- This will typically make the docs available on
http://localhost:1111
, it'll say where exactly after you run the above command. - Woo! Now if you make any updates to msupply_docs files, zola will detect the changes and refresh your browser tab for you.
Update and commit directly to main until a review process is defined 😉
If you wish to serve images from a subdirectory rather than co-locating the content or storing in the static folder, you have to include an index file (_index.md
) for the subdirectory to be included in the build.
This repo is automatically deployed to github pages on push to main. The github action is defined in .github/workflows/static_deploy.yml
The deployment code uses zola 17.2