Farmer's docs use Hugo and the hugo-theme-learn theme.
-
Install Go language support and Hugo (if on Windows, we recommend using Chocolatey and running
choco install golang hugo
)Note: there is currently a problem with the newest version of Hugo and the theme, so use version 0.68.3 of Hugo, otherwise you'll get a compilation error
-
The theme is in a sub-module, so you'll also want to run
git submodule update --init
and thencd docs/themes
followed bygit clone https://github.com/compositionalit/hugo-theme-learn.git
-
To build, run
hugo --minify
from thedocs
folder. To serve a local copy, runhugo server
.
These docs use GitHub Actions and the Actions-hugo tooling to publish the contents to GitHub pages
How it works:
- A change is committed to the
master
branch (say, when a PR is merged). - The GitHub Actions workflow begins.
- The action runs hugo against the
docs
folder, and then publishes thepublic
folder output to thegh-pages
branch. - The
gh-pages
branch is served by GitHub Pages at https://compositionalit.github.io/farmer.