Skip to content

Custom toc position - #49

Open
ju-mueller wants to merge 3 commits into
orzih:masterfrom
GreyRook:custom-toc-position
Open

Custom toc position#49
ju-mueller wants to merge 3 commits into
orzih:masterfrom
GreyRook:custom-toc-position

Conversation

@ju-mueller

Copy link
Copy Markdown
Contributor

Hello again. I added

  • The ability to disable the TOC.
  • The ability to set a different TOC position in the document. This is useful, when you need e.g. a foreword in before your TOC.

@SteffenL

Copy link
Copy Markdown

The ability to disable the TOC.

ToC does not seem to render if the toc_level option has a value of 0. Haven't tested your code so I don't know if and how that would be different.

@ju-mueller
ju-mueller force-pushed the custom-toc-position branch 2 times, most recently from e95a1d5 to bcae9db Compare January 20, 2021 09:11
@orzih orzih added the enhancement New feature or request label Jan 22, 2021
@orzih

orzih commented Jan 22, 2021

Copy link
Copy Markdown
Owner

Hi ju-mueller.

I've some suggestion.

1. Isn't toc keyword too vague in nav entries?

mkdocs (and document maintainers) might get confused.

WARNING -  A relative path to 'toc' is included in the 'nav' configuration, which is not found in the documentation files

It's better to use a custom scheme like with-pdf:toc - (mkdocs will make Link object).

2. Is toc option needed?

I think it's enough to print a warning message if nav contains a custom scheme and toc_level is 0.

3. About pages before the ToC.

  • exclude in ToC.
  • headings without ordered.

@ju-mueller

ju-mueller commented Jan 25, 2021

Copy link
Copy Markdown
Contributor Author

Thanks for your suggestions. I'll look that I find some time during the next weeks to implement that.

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

Successfully merging this pull request may close these issues.

3 participants