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

How to deal with multi-level documents? — Top sections #18

Closed
rei-vilo opened this issue Oct 4, 2020 · 4 comments
Closed

How to deal with multi-level documents? — Top sections #18

rei-vilo opened this issue Oct 4, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@rei-vilo
Copy link

rei-vilo commented Oct 4, 2020

Derived from #17

The sections in the navigation are not displayed in the print page table of contents.

First level headers are omitted from the TOC, here Chapter 1

Based on same minimal test I am using to evaluate Print Site.

@timvink
Copy link
Owner

timvink commented Oct 7, 2020

Making some progress on this:

image

@timvink timvink added the bug Something isn't working label Oct 7, 2020
@timvink timvink added enhancement New feature or request and removed bug Something isn't working labels Oct 7, 2020
@timvink
Copy link
Owner

timvink commented Oct 7, 2020

This has been on backlog for quite some time, indeed it is much better if the table of contents properly reflects the mkdocs navigation.

This functionality is now available in v0.8.

Btw, have you considered using enumeration instead of manually adding the chapter numbers?

plugins:
  - print-site:
      enumerate_headings: true

@timvink timvink closed this as completed Oct 7, 2020
@rei-vilo
Copy link
Author

rei-vilo commented Oct 7, 2020

Thank you for the fast implementation for the multi-level documents!

The problem with the plugins: - print-site: enumerate_headings: true option as well as for plugins: - enumerate-headings is numbering starts with the first chapter, here 1 ToC.

I haven't found a way to force some chapters to be ignored, here 1. ToC and 2. About, so Chapter 1 could appear as 1. Chapter 1.

Capture 2020-10-07 à 21 45 00

The file I provided for testing was just an minimal example to ease the replication of the case.

@timvink
Copy link
Owner

timvink commented Oct 8, 2020

The problem [...] is numbering starts with the first chapter, here 1 ToC.

Well, perhaps you don't need a table of contents chapter?

I have been thinking about implementing a way to limit the depth of the ToC in print-page, because h6 headings probably are not necessary to show in the ToC

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

No branches or pull requests

2 participants