Documentation
Documentation for Cannlytics is written in Markdown and lives in the docs
folder. The configuration for the documentation is contained within mkdocs.yml
. Building the documentation requires Material for MkDocs and Docker.
Writing documentation
First, you will need to pull and build the Material for MKDocs Docker image:
docker pull squidfunk/mkdocs-material
docker build -t squidfunk/mkdocs-material docs
or
npm run docs:install
You will also need to install the Python dependencies for the documentation:
pip install -r docs/requirements.txt
Once you have a copy of the Docker image, you can preview the documentation as you write:
docker run --rm -it -p 8000:8000 -v "%cd%":/docs squidfunk/mkdocs-material
or
npm run docs:start
You can preview the documentation at http://localhost:8000/ while you develop.
Note
There is a namespace conflict between django-livereload-server
and livereload
, so you need to be careful when and where you install Python requirements. If you run into a django-livereload-server
import error, first check that PRODUCTION=False
in your .env
file and then follow these instructions to uninstall livereload
and reinstall django-livereload-server
.
Publishing documentation
When you are ready, you can build the documentation with:
npm run docs:build
Finally, you can publish the documentation with:
npm run docs:publish
Congratulations, you can now read the documentation at https://docs.cannlytics.com.