Skip to content

Commit

Permalink
Add docs for MaxLevelInToC feature
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Jul 4, 2017
1 parent 9c73bde commit f1e24d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MarkdownSource/docnetjson.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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.

Expand Down
6 changes: 6 additions & 0 deletions MarkdownSource/h2leveldiscovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f1e24d2

Please sign in to comment.