Updating Documentation
The documentation is written in Markdown, this website is generated based on this Markdown content using Material for MkDocs and the documentation versioning is done with mike.
This website is hosted on GitHub Pages based on the gh-pages
branch (i.e. the default GitHub Pages branch).
Updating based on main
Branch
To update the current documentation based on the main
branch:
- Install Material for MkDocs
- Run inside the local repo/installation folder of K2s:
- Open http://127.0.0.1:8000/K2s/ in your web browser to see your local changes being applied on-the-fly
- Submit your changes
- Wait for the automatically triggered workflow
to finish
Your changes are now published to https://siemens-healthineers.github.io/K2s/next
Note
Since mkdocs serve
does not take versioning into account, the following warning will appear in the console output:
"GET /versions.json HTTP/1.1" code 404
This warning can safely be ignored. To test different documentation versions locally, see Documentation Versioning.
Documentation Versioning
To provide different versions of the generated documentation (e.g. a version per release and a current one matching the contents of the main
branch), to tool mike can be utilized like described in the following:
If not done already, install mike:
To inspect all existing documentation versions on the gh-pages
branch, run:
To add a new version, run:
Example
To create a new version v1.2.3
with the tag latest
, run:
gh-pages
branch that still has to be pushed to origin.
Alternatively, mike can also create a new version and push the changes in one call with the -p
or --pull
parameter:
To set a default version the user is redirected to when browsing the root URL:
Example
To set the default version to the one with the tag latest
, run:
To delete a version, run:
To preview documentation versioning, run:
Tip
mike serve
is similar to mkdocs serve
, but additionally takes versioning into account. On the other hand, mike's local dev server is extremely slow compared to mkdocs's built-in dev server so the recommendation is to use mkdocs serve
for previewing changes to the documentation and mike serve
for previewing changes to the versions.