From 2bd6f58d00e21aeaee023d8f288ed8b5e751fd2b Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Feb 07 2023 08:57:29 +0000 Subject: Added documentation snippet for sigs.centos.org Signed-off-by: Fabian Arrotin --- diff --git a/docs/documentation.md b/docs/documentation.md new file mode 100644 index 0000000..8d498f7 --- /dev/null +++ b/docs/documentation.md @@ -0,0 +1,29 @@ +# Documentation + +There is a possibility to also host your documentation under https://sigs.centos.org, following a workflow based on [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) (an enhanced version of [mkdocs](https://www.mkdocs.org/). This SIG Guide is itself following the same workflow, built from .md files hosted in a git repository. + +If you want to use the same workflow, proceed like this: + + * create a git repository somewhere (it can be hosted on centos infra - gitlab or pagure - but no limitation) + * locally test material for mkdocs (see below) + * create [CentOS Infra tracker issue](https://pagure.io/centos-infra/new_issue) that would contain the SIG name, public git url to clone/pull from + * once you commit to your upstream git project, it will be rendered in the next minutes and pushed to sigs.centos.org dedicated folder + +## How to test locally material for mkdocs + +The easiest way is just to use podman and a container: + +``` +podman pull docker.io/squidfunk/mkdocs-material:latest +``` + +Prepare your mkdocs.yml (see [ours](https://git.centos.org/centos/sig-guide/blob/master/f/mkdocs.yml) as quick reference and your `docs` folder containing your markdown (.md) files. +Write documentation and once you have your skeleton, just test locally like this : + +``` +podman run --rm -it -p 8000:8000 -v ${PWD}:/docs:z squidfunk/mkdocs-material +``` + +You can now open your browser to http://localhost:8000 and you'll be able to see live your edit/changes. +Once happy, you can commit to git and see the rendered result in the next minutes going live + diff --git a/mkdocs.yml b/mkdocs.yml index 159edf4..e65c4db 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,6 +13,7 @@ nav: - ci.md - delivery.md - dns.md + - documentation.md - SIG's spin: spin.md - Using GitLab: gitlab.md