Skip to content

PremiereGlobal/mkdocs-generator

Repository files navigation

Mkdocs Generator (for Bitbucket)

Build Go Report Card License

This project scans an entire bitbucket instance for repositories with documentation and builds a mkdocs website.

Docker

docker run \
  -e MG_BITBUCKET_URL=<bitbucket_url> \
  -e MG_BITBUCKET_USER=<bitbucket_user> \
  -e MG_BITBUCKET_PASSWORD=<bitbucket_token> \
  -v $(pwd)/docs:/docs \
  -v $(pwd)/html:/html \
  premiereglobal/mkdocs-generator

Docker Volumes

The following default volume mounts should be considered. These can be changed via the environment variables below.

/docs - Directory containing a mkdocs.yaml file as well as any top-level markdown files in a subdirectoy named docs. /html - Directory to put the final, rendered html. Any unecessary files will be removed from this directory. /build - Will contain the mkdocs build directory. This is mostly used for development and debugging.

Docker Environment Variables

To customize some properties of the container, the following environment variables can be passed via the -e parameter (one for each variable).

Variable Description Default/Required
MG_BITBUCKET_URL The full address of the instance of Bitbucket to scan. For example https://bitbucket.mysite.com required
MG_BITBUCKET_USER User to use to authenticate against Bitbucket. required
MG_BITBUCKET_PASSWORD Bitbucket user password or token. required
MG_LOG_LEVEL Log level. Can be debug, info or warn. info
MG_BUILD_DIR Build directory /build
MG_DOCS_DIR Directory containing a mkdocs.yaml file as well as any top-level markdown files in a subdirectoy named docs. See Volumes section above. /docs
MG_HTML_DIR Directory to put the final, rendered html. Any unecessary files will be removed from this directory. See Volumes section above. /html