Welcome to the documentation of the SLE Base Container Images!
The documentation relies on both Hugo, the static site generator, and nodejs which is used in the theme.
When you checkout the codebase you need to be sure to get the submodules. The theme is setup as a submodule. If you checked out the code without updating the submodules you can run the following command to get the theme as a submodule:
git submodule update --init --recursive
Once the theme is available you will need to install the JavaScript dependencies and build them. This can be done with the following commands:
cd themes/hugo-geekdoc
npm install
npm run build
cd ../..
Additionally, you have to install
asciidoctor for processing of the asciidoc
files. Please refer to the
upstream installation
instructions how to install asciidoctor either via your
distribution’s package manager or via gem
.
From here you can run Hugo as a server to see the served documentation locally. Hugo can be run from the CLI via:
hugo server
The documentation is written in the asciidoc format to simplify the integration into the SLE documentation. Asciidoc is another markup format very similar to markdown and can be used with Hugo without any larger adjustments. Most Hugo shortcodes will "just work", although you have to adjust the shortcode a bit as the upstream documentation only shows examples in markdown.
For example, the relref
shortcode is used as follows in markdown:
[link name]({{< relref "/path/to/link/target.md" >}})
which translates to the following in asciidoc:
link:{{< relref "/path/to/link/target.adoc" >}}[link name].