Before installing MkDocs, you need to make sure you have Python and
– the Python package manager – up and running. You can verify if you're already
good to go with the following commands:
python --version # Python 3.6.7 pip --version # pip 19.0.3
If you have multiple versions of python and python 3 is not your default version, use
Installing and verifying MkDocs is as simple as:
pip install mkdocs && mkdocs --version # mkdocs, version 1.0.4
MkPDFs for MkDocs can be installed with
pip, which is the prefered installation method.
You just have to run the following command:
pip install mkpdfs-mkdocs
You can customise the layout of the generated PDF using exposed options presented in the folliwing table.
||The author of the document. This information will be printed on the cover page of the generated PDF.|
||If this documentation is from a company, then you should provide this information. It will be displayed on the front page of the documentation, bellow the author information|
||The table of content title. The default value is Table of Contents|
||The position of the table of contents. This option supports 3 differents values:
||The file name of the generated PDF, relative to the
||Relative to your
Here is an example of configuration that you can adapt depending on your needs.
plugins: - search - mkpdfs: company: The War Company Inc. author: Monsieur Silvestre toc_title: ToC
Hide file content from the generated PDF
Sometime it can be interesting to hide a given documentation file from the PDF.
This can be achieved by using the Mkdocs YAML Style Meta-Data features.
For this, define a
False in the top of your Markdown file like in the following example.
--- pdf: False --- #Page title
You have the ability to design the layout of your Generated PDF by using CSS. You can find out complete documentation by visiting our Layout customisation section.