- Visit https://xapi-project.github.io/new-docs/ to view the current documentation.
The docs use Hugo and the Hugo Relearn theme, an enhanced fork of the popular Hugo Learn theme.
Hugo Relearn 7.3.2 is currently used (defined by a git tag in doc/go.mod).
- The minimum Hugo version required by the Relearn theme is 0.126.0.
- The current Ubuntu
snap(which provides 0.142.0) also works.
- Install Hugo 0.126 or newer (required by the Hugo Relearn theme)
follow the guidance on https://gohugo.io/installing.
You'll need to install Go as well: see https://go.dev/
-
On Ubuntu, use the
snappackage:sudo snap install hugoinstalls the current versionapt-get install hugowould install a version that is too old, (this applies up to Ubuntu 24.04)
-
To install Hugo from source, you need a recent
golang-1.2xcompiler:-
On Ubuntu 22.04, this can be done with:
sudo apt install golang-1.23-go # Add it to your path, assuming your .local/bin/ is early in your PATH: ln -s /usr/lib/go-1.23/bin/go ~/.local/bin/go go version go install github.com/gohugoio/hugo@v0.127.0
-
-
-
Run a local server:
hugo server -
Open a browser at http://127.0.0.1:1313/new-docs/
-
Add content to
doc/content/:- Documents are written in Markdown.
- Please wrap lines in paragraphs to make reviews more manageable.
- The menu hierarchy comes mainly from the directory structure in
content/. - A file called
_index.mdis needed in a directory to define a new level in the menu.- To set the page title, use the front matter.
- For a page that has images or other stuff included, it is best to create a new directory:
Put the contents in an
index.mdfile (no_) and the related files next to it. See https://gohugo.io/content-management/organization/ for more information.
See https://mcshelby.github.io/hugo-theme-relearn/ for more information about the features of the Relearn theme, including handy "shortcodes".
Note: When switching versions, before re-generating the documentation using
hugo server, delete the previously generated static site using rm -r docs/public.
Backported fixes to support newer Hugo versions:
layouts/partials/header.html, it fixes:ERROR deprecated: .Sites.First was deprecated in Hugo v0.127.0 and will be removed in Hugo 0.143.0. Use .Sites.Default instead.
layouts/partials/menu.html, it fixes:ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.143.0. Use hugo.IsMultilingual instead.
The fixes for those issues were backported from the Hugo Relearn v7.x.x theme. When updating to Hugo Relearn 7.x.x, please remove them (if possible).
Check the release notes of the Hugo Relearn theme for breaking changes: https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes
These pages might need review when making changes as their content is generated by layouts/partials/content.html:
- XenAPI Reference: https://xapi-project.github.io/new-docs/xen-api/classes
- XenAPI Releases: https://xapi-project.github.io/new-docs/xen-api/releases
For a summary of the partials supported by the Hugo Relearn theme, see: https://mcshelby.github.io/hugo-theme-relearn/configuration/customization/partials
Hint: For upgrading the Hugo Relearn theme, you can use:
cd doc; hugo mod get -u github.com/McShelby/hugo-theme-relearn@7.4.0Hugo >= 0.126 and the Hugo Relearn >= 7.3.2 are supported to render the docs.
- Changes with Relearn 6.x: https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/6/#6-0-0
- Breaking changes with Relearn 7.x: https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/7/#7-0-0