You can create a custom cover page using a Jinja2 or HTML file. The template file must be stored in the directory specified by the custom_template_path option. The filename should be cover.html, cover.html.j2, or match the document type (e.g., manual.html if the document type is manual).
Available Jinja2 variables for the cover template:
cover_title, cover_subtitle, cover_imageauthor, author_logo, copyright, site_url, revision- Custom variables defined in the
extra setting of mkdocs.yml - Options provided under local PDF metadata in a Markdown file.
plugins:
- pdf-generate:
custom_template_path: path/to/templates
author: Duodu Randy
<!-- Example cover.html.j2 -->
<article id="doc-cover">
{% if cover_image is defined %}
<div class="wrapper upper">
<div class="logo" style="background-image: url('{{ cover_image | to_url }}');"></div>
</div>
{% endif %}
<div class="wrapper">
<h1>{{ cover_title | e }}</h1>
<h2>{{ cover_subtitle | e }}</h2>
</div>
<div class="properties">
<address>
{% if author %}<p id="author">{{ author | e }}</p>{% endif %}
<a href="{{ site_url }}"><img src="{{ author_logo }}" style="width:80px;height:30px"/></a>
</address>
</div>
</article>