mkdocs-with-pdf icon indicating copy to clipboard operation
mkdocs-with-pdf copied to clipboard

Custom toc position

Open ju-mueller opened this issue 4 years ago • 3 comments

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.

ju-mueller avatar Jan 18 '21 10:01 ju-mueller

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.

SteffenL avatar Jan 19 '21 16:01 SteffenL

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.

orzih avatar Jan 22 '21 08:01 orzih

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

ju-mueller avatar Jan 25 '21 09:01 ju-mueller