Thanks for the fantastic module. It made my day.
I wanted to change the red underlines for the material theme, and eventually found it. Here's the missing docs for customizing the scss.
custom_template_path
The scss styles are used for setting up the values used at render time.
To see the current scss in use, look under
venv/lib/python3.12/site-packages/mkdocs_to_pdf/styles/*.scss
To override them, create a file named styles.scss and then put it in your mkdocs project folder, such as docs/assets/stylesheets/styles.scss
Then reference this path in the custom_template_path option in mkdocs.yaml
plugins:
- to-pdf:
custom_template_path: ./docs/assets/stylesheets
NOTE: This is the path to styles.scss. Do not include the filename itself.
Consider using !important to force an override.
To change the red underlines here is a sample styles.scss
article {
h1 {
border-bottom: 2px solid #0000ff !important;
}
h2 {
border-bottom: 1px solid #000099 !important;
}
h3 {
border-bottom: 0.5px solid #eee;
}
}
Thanks for the fantastic module. It made my day.
I wanted to change the red underlines for the material theme, and eventually found it. Here's the missing docs for customizing the
scss.custom_template_path
The scss styles are used for setting up the values used at render time.
To see the current scss in use, look under
To override them, create a file named
styles.scssand then put it in your mkdocs project folder, such asdocs/assets/stylesheets/styles.scssThen reference this path in the
custom_template_pathoption in mkdocs.yamlNOTE: This is the path to styles.scss. Do not include the filename itself.
Consider using
!importantto force an override.To change the red underlines here is a sample styles.scss