From f1e24d22850311146a501f4ee8376579b8247642 Mon Sep 17 00:00:00 2001 From: Geert van Horrik Date: Tue, 4 Jul 2017 11:11:27 +0200 Subject: [PATCH] Add docs for MaxLevelInToC feature --- MarkdownSource/docnetjson.md | 2 ++ MarkdownSource/h2leveldiscovery.md | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/MarkdownSource/docnetjson.md b/MarkdownSource/docnetjson.md index a0f19a8..cc7a48e 100644 --- a/MarkdownSource/docnetjson.md +++ b/MarkdownSource/docnetjson.md @@ -14,6 +14,7 @@ DocNet uses a json file to determine what to do in what form. The format is stra "Footer" : "footer text or HTML", "ConvertLocalLinks: "true" | "false", "PathSpecification": "Full" | "Relative" | "RelativeAsFolder", + "MaxLevelInToC": "3", "Pages" : { "__index" : "index.md", @@ -43,6 +44,7 @@ The order in which the pages are specified is the order in which they'll appear * `Full`: Assumes that all paths are full paths. All auto-generated index files will be placed in the root folder (this setting can lead to index clashes when reusing names in subfolders). * `Relative`: Assumes that all paths are relative paths. All auto-generated index files will be put in the right (sub)folder. * `RelativeAsFolder`: Behaves the same as `Relative`, but puts *every* source md in its own folder resulting in clean navigation urls (e.g. `/getting-started/introduction.htm` becomes `/getting-started/introduction/index.htm`) +* `MaxLevelInToC`. Sets the level of headings to show in the Table of Contents (ToC). The default value is `2`. To show one additional level, one would use `3` for this value. *Note that level 1 headings (titles) are never shown in the ToC).* * `Footer`. This is text and/or HTML which is placed in the footer of each page, using a _marker_ (see below). * `Pages` contains the pages to generate into the output, in the order and structure in which you want them to appear in the navigation. The name given is the value used in the navigation tree and has to be unique per level. The value specified with each name is the markdown file to load, parse and generate as .htm file in the output. The markdown file is relative to the path specified in `Source`. A file `foo.md` will be generated as `foo.htm` in the output. diff --git a/MarkdownSource/h2leveldiscovery.md b/MarkdownSource/h2leveldiscovery.md index ef9765a..dcbfe2e 100644 --- a/MarkdownSource/h2leveldiscovery.md +++ b/MarkdownSource/h2leveldiscovery.md @@ -2,3 +2,9 @@ Automatic H2 level ToC entry discovery ====================================== `Docnet` will automatically add all H2 (`##` marked) headers to the ToC as sub navigation elements below a page ToC item. It will automatically add anchors to these H2 headers in the HTML output for the page as well. This makes it very easy to create a fine-grained ToC for easy discovery. + +This behavior can be overridden by the `MaxLevelInToC` [configuration option](./docnetjson.md). + +@alert info +Note that level 1 headings (titles) are never shown in the ToC). +@end \ No newline at end of file