forked from orzih/mkdocs-with-pdf
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Thank you very much for reviving this wonderful project! There is a small feature I have always wanted to see in this plugin.
Currently, it is possible to use "author", "copyright", and "title" in styles.scss, for example, like this:
@page {
@top-left {
content: string(title);
}
}
However, it is not possible to use "subtitle", which I would really like.
I think adding this feature is a one line change. My experiments show this can be easily done by modifying the style_for_print function in styles/__init__.py as follows:
def style_for_print(options: Options) -> str:
scss = f"""
:root {{
string-set: author '{_css_escape(options.author)}',
copyright '{_css_escape(options.copyright)}',
title '{_css_escape(options.cover_title)}',
subtitle '{_css_escape(options.cover_subtitle)}';
}}
h1, h2, h3 {{
string-set: chapter content();
}}
"""
Thank you!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels