Mkdocs - Creating Documentation

 

1. Install Mkdocs strings

      $ python -m pip install mkdocstrings

2. In the root directory of the repository, create directory 'docs/' where .md files will be placed

3. Copy to the root directory the file mkdocs.yml, alter it according to the formula to fit your project

4. Create .md files

5. To visualize locally, in the root directory:

     $ mkdocs serve

 

Hosting docs online

1. Create subdomain

2. To compile the docs, in the root directory

    $ mkdocs build

3. Upload everything in sites/ directory to the subdomain

 

 

Hosting docs in GitLab Pages

1. Copy to root directory .gitlab-ci.yml & requirements_docs.txt

2. Create requirements.txt

3. Use (in mkdocs.yml) the model for GitLab Pages URL https://[username].gitlab.io/[repository]/