Alpine based container to use MkDocs.
These are basic examples based on the Getting started section of MkDocs.
Botstraps MkDocs in the current directory:
docker run -it -v $(pwd):/doc elamperti/docker-mkdocs new .
Useful for testing. This will serve the current directory:
docker run -it -v $(pwd):/doc -p 8000:8000 elamperti/docker-mkdocs serve -a 0.0.0.0:8000
Generates a static site using the markdown files:
docker run -it -v $(pwd):/doc elamperti/docker-mkdocs build
MkDocs uses a YML configuration file (mkdocs.yml
), for more information on that read their documentation.
You may find specially useful the docs_dir
and site_dir
settings, as they specify from where docs are read and to which directory the site is built.
These are the current extensions and themes built in:
- PyMdown
- Material for MkDocs
- Pygments (so you can use
codehilite
extension)