-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use frontmatter title
in place of level 1 heading for TOC and heading enumeration
#94
Comments
This would be great. It is very painful to have to go around adding h1s to docs to get them to work. |
Agreed. It's a pain to add these h1's after the fact. |
This one is tricky. The most common 'mistake' I've seen is that people use a secondary level heading as the first heading on a page, like so:
Then other pages have normal titles again like so:
When you combine these pages, the level of the title is not identical, which really messes up the layout and the TOC (the small one on the right): Hence the logic to detect this and raise an error (also deals with the edge case that there are pages that have no title at all, because some users indeed it to be part of the previous page when the entire site is combined into a single page, or because they just didn't want a title). mkdocs-print-site-plugin/mkdocs_print_site_plugin/plugin.py Lines 219 to 230 in 0a7300b
You propose using the mkdocs behaviour of page titles, which is actually just using The unit tests pass.. but before I release it I'd appreciate if someone could give it a spin for their use case. Maybe @sblausten or @dtuite ? You can install it form the pull request branch: #104 pip install git+https://github.com/timvink/mkdocs-print-site-plugin.git@support_missing_h1 If it works I'll merge and release on pypi. |
This is more of a feature request than bug report.
I am trying to use this plugin but the majority of the docs do not have a level 1 heading, resulting in almost all of them triggering the following error:
To enhance the compatibility of this plugin regarding page title, I would like to propose for the plugin to mimic the MkDocs behaviour of determining the page title:
The text was updated successfully, but these errors were encountered: