docs-to-pdf
docs-to-pdf copied to clipboard
Idea: Align headers level to the sidebar nesting, or make page level configurable by meta keywords
At the moment, when generating a PDF from a Website, every subpage starts with a <h1>. However on the Website some pages are nested under higher level pages.
For example:
- https://docusaurus.io/docs/next/category/getting-started
- https://docusaurus.io/docs/next/installation
- https://docusaurus.io/docs/next/configuration
Here getting started is the entry point and has multiple subsites like "installation" and "configuration" and so on.
I question myself whether it would be great to finde out, if a page is a parent or a child and automatically change the heading level to the next, when it is a child. On installation the <h1> would become a <h2> and so on...
💡 We could also manage this with meta keywords, so it would be manual configurable per page :) Together with the bookmarks enhancement this would make it superior to word and google docs.
What do you think?
This behavior could be activated with a --alignTOCWithSidebar option.