mkdocs-print-site-plugin icon indicating copy to clipboard operation
mkdocs-print-site-plugin copied to clipboard

Adjust heading level from markdown files

Open mbs44 opened this issue 1 year ago • 1 comments

Hi

I have a bigger technical documentation generated from real world application in mkdocs format with material design theme. I have used print-site plugin quite successfully but one problem I couldn't solve.

I have a structure of folders of depth 3 or 4 and folders contain markdown files. I'm using heading 1 and often heading 2 inside markdown files. Everything works and looks nicely on the original multi file web page.

But if I generate everything into single page file then surprisingly the heading levels from the individual markdown files stay the same. E. g. in the output print_page.html I have heading 3 generated from the folder structure and then follows the first heading 1 from the individual markdown file which doesn't look nice. I would expect heading 4 in this case, so the heading level from markdown file should be shifted by the current depth of folder structure.

For example when I generate the pdf file using with-pdf plugin the headings from markdown files are adjusted correctly and the numbering is correct too.

Am I missing some setting or doing it wrongly? On the other hand I would expect this should be the default behavior.

mbs44 avatar Aug 28 '24 11:08 mbs44

Can you provide some examples (i.e. relevant file structure, markdown headings and screenshot of PDF output headings) so it is a little clearer what the problem is?

nurse-the-code avatar Aug 29 '24 05:08 nurse-the-code

This should be fixed by #128, released in v2.7.0

timvink avatar Mar 13 '25 10:03 timvink