Documentation¶
Documentation is generated using mkdocs and deployed on Drupal's GitLab instance using GitLab Pages.
Deployment¶
MkDocs is first built by the mkdocs
job and an artifact is created.
GitLab Pages is then deployed by the deploy-pages
job. You can see the URL in
the job logs:
Merge requests¶
Documentation is also deployed to a preview environment when a merge request is
created. You can see the URL for the preview environment in the preview-pages
job logs:
Local development¶
If you do not already have it installed, install pip.
Execute the following commands to install pip packages, build the documentation, and serve it on localhost:
pip install mkdocs mkdocs-material mkdocs-glightbox mkdocs-awesome-pages-plugin
mkdocs build
mkdocs serve
The final command should generate output like this:
INFO - Building documentation...
INFO - Cleaning site directory
INFO - Documentation built in 0.14 seconds
INFO - [11:44:05] Watching paths for changes: 'docs', 'mkdocs.yml'
INFO - [11:44:05] Serving on http://127.0.0.1:8000/member/
Go to the link it provides and you should see the documentation. When you make changes, it should automatically rebuild and refresh the page in your browser: