Skip to content
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

Sidebar subnav disappearance #47

Closed
markallasread opened this issue Sep 20, 2016 · 2 comments
Closed

Sidebar subnav disappearance #47

markallasread opened this issue Sep 20, 2016 · 2 comments

Comments

@markallasread
Copy link
Sponsor Collaborator

When a single mkdocs document has two (or more) h1 headers (# in markdown) — any headers beneath the second h1 do not show up in the subnav.

Perhaps it's a hint I should use less h1s (single # in markdown), but, assuming it could also be a bug. Might not be one in the rework, haven't had a chance to verify yet.

@squidfunk
Copy link
Owner

Yeah, this is kind of a hack to get the table of contents working correctly, because the title of the page is already shown in the sidebar and it would be redundant showing it a second time in the table of contents.

It relies on the fact that it's only valid HTML to use one h1 tag per content section that is the actual page. Multiple h1 tags must be nested inside article tags which are not part of the generated Markdown, so only one h1 is allowed per page. This h1 get's parsed in the template and is used within the header.

It might be a bit different with the rework version, I have to check again, but for now it's not possible, I'm sorry. However, it's not valid anyway.

@markallasread
Copy link
Sponsor Collaborator Author

Thanks! I trust your judgement, I'll adjust my workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants