MkDocs with pdf-export-plugin (WeasyPrint) and it's dependencies
1.7K
A Docker image with MkDocs (https://www.mkdocs.org) intended to be used with CI/CD tools (drone.io in our particular case) to generate documentation websites from MarkDown source files.
The image comes with MkDocs (default templates and MarkDown extensions) installed with Python 3.7 on Linux Alpine. As additional options, the following packages are also installed:
mkdocs-pdf-export-plugin with WeasyPrint and all it's dependencies, to allow PDF exportmkdocs-bootswatch for themes based on BootswatchTo enable PDF export, in the mkdocs.yml add:
plugins:
- pdf-export:
media_type: print
theme_handler: pdf_export.py
The theme_handler is needed if you don't use the theme material. You will need to provide a pdf_export.py handler. See https://github.com/zhaoterryy/mkdocs-pdf-export-plugin/#theme_handler_path for more information.
More info on MkDocs at https://www.mkdocs.org.
An example of .drone.yml pipeline configuration:
kind: pipeline
name: default
steps:
- name: Build docs
image: soluxioni/mkdocs-pdf-export-plugin
commands:
- cd doc-project-folder
- mkdocs build
when:
branch:
- master
event:
- push
- name: Deploy docs
image: drillster/drone-rsync
settings:
hosts: ["your.web.host.com"]
user: root
key:
from_secret: example_private_key
source: /drone/src/doc-project-folder/site/
target: /var/www/doc-website/
when:
branch:
- master
event:
- push
More info on Drone.io at https://docs.drone.io/.
Content type
Image
Digest
Size
172.7 MB
Last updated
almost 7 years ago
docker pull soluxioni/mkdocs-pdf-export-plugin