badboy / mdbook-toc

A preprocessor for mdbook to add inline Table of Contents support.
Mozilla Public License 2.0
163 stars 20 forks source link

Limit the depth of the toc #11

Closed Hoffenbar closed 3 years ago

Hoffenbar commented 3 years ago

Idea: It would be great if one could limit the depth of the headers that were included in the toc, .e.g. only take # and ## into account. Oh, sorry - I overlooked that this is already limited to two levels. But then It would be nice if this was collapsable...

Addition: Level-3 Headers (###) are included in the toc, too - although the doc states that only level-1 and -2 are included...

badboy commented 3 years ago

It's actually 4 layers now!.

Given that we're gonna have some config soon (#5) we could indeed add that as well.