diff --git a/css/theme.css b/css/theme.css
index 3966afc..e7e3c3d 100644
--- a/css/theme.css
+++ b/css/theme.css
@@ -1047,10 +1047,26 @@ div.figure p {
}
.menu-vertical li.tocentry {
- padding-left: 15px;
+ padding-left: 20px;
padding-top: 7px;
}
+.menu-vertical li.tocentry.current > ul.currentrelative {
+ padding-left: 7px;
+ padding-bottom: 5px;
+ margin-top: 0;
+}
+
+.menu-vertical li.tocentry > ul.currentrelative {
+ padding-left: 7px;
+ padding-bottom: 5px;
+ margin-top: -3px;
+}
+
+.menu-vertical li.tocentry > ul.currentrelative > li.tocentry {
+ padding-top: 3px !important;
+}
+
.menu-vertical li.tocrootentry {
padding-left: 15px;
}
diff --git a/docnetjson.htm b/docnetjson.htm
index 3c179dd..a2df856 100644
--- a/docnetjson.htm
+++ b/docnetjson.htm
@@ -39,7 +39,11 @@
Site configuration with the docnet.json file
Automatic H2 level ToC entry discovery
@@ -92,6 +96,7 @@
"Footer" : "footer text or HTML",
"ConvertLocalLinks: "true" | "false",
"PathSpecification": "Full" | "Relative" | "RelativeAsFolder",
+ "MaxLevelInToC": "3",
"Pages" :
{
"__index" : "index.md",
@@ -125,6 +130,7 @@
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/h2leveldiscovery.htm b/h2leveldiscovery.htm
index 9fdac4b..25e3ace 100644
--- a/h2leveldiscovery.htm
+++ b/h2leveldiscovery.htm
@@ -79,7 +79,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 .
+
InfoNote that level 1 headings (titles) are never shown in the ToC).
+
diff --git a/markdownextensions.htm b/markdownextensions.htm
index f3ad303..9582855 100644
--- a/markdownextensions.htm
+++ b/markdownextensions.htm
@@ -49,10 +49,17 @@
DocNet Markdown extensions
@@ -162,9 +169,9 @@ feature's power as it keeps the documentation in sync with the embedded code wit
/// </summary>
/// <param name="navigatedPath">The navigated path to the current element, which doesn't necessarily have to be this element.</param>
/// <param name="relativePathToRoot">The relative path back to the URL root, e.g. ../.., so it can be used for links to elements in this path.</param>
-/// <param name="pathSpecification">The path specification.</param>
+/// <param name="navigationContext">The navigation context.</param>
/// <returns></returns>
-public override string GenerateToCFragment(NavigatedPath navigatedPath, string relativePathToRoot, PathSpecification pathSpecification)
+public override string GenerateToCFragment(NavigatedPath navigatedPath, string relativePathToRoot, NavigationContext navigationContext)
{
var fragments = new List<string>();
if (!this.IsRoot)
@@ -186,7 +193,7 @@ public override string GenerateToCFragment(NavigatedPath navigatedPath, string r
// first render the level header, which is the index element, if present or a label. The root always has an __index element otherwise we'd have stopped at load.
var elementStartTag = "<li><span class=\"navigationgroup\"><i class=\"fa fa-caret-down\"></i> ";
- var indexElement = this.GetIndexElement(pathSpecification);
+ var indexElement = this.GetIndexElement(navigationContext.PathSpecification);
if (indexElement == null)
{
fragments.Add(string.Format("{0}{1}</span></li>", elementStartTag, this.Name));
@@ -195,18 +202,18 @@ public override string GenerateToCFragment(NavigatedPath navigatedPath, string r
{
if (this.IsRoot)
{
- fragments.Add(indexElement.PerformGenerateToCFragment(navigatedPath, relativePathToRoot, pathSpecification));
+ fragments.Add(indexElement.PerformGenerateToCFragment(navigatedPath, relativePathToRoot, navigationContext));
}
else
{
fragments.Add(string.Format("{0}<a href=\"{1}{2}\">{3}</a></span></li>",
- elementStartTag, relativePathToRoot, indexElement.GetFinalTargetUrl(pathSpecification), this.Name));
+ elementStartTag, relativePathToRoot, indexElement.GetFinalTargetUrl(navigationContext.PathSpecification), this.Name));
}
}
// then the elements in the container. Index elements are skipped here.
foreach (var element in this.Value)
{
- fragments.Add(element.GenerateToCFragment(navigatedPath, relativePathToRoot, pathSpecification));
+ fragments.Add(element.GenerateToCFragment(navigatedPath, relativePathToRoot, navigationContext));
}
fragments.Add("</ul>");
}
@@ -214,7 +221,7 @@ public override string GenerateToCFragment(NavigatedPath navigatedPath, string r
{
// just a link
fragments.Add(string.Format("<span class=\"navigationgroup\"><i class=\"fa fa-caret-right\"></i> <a href=\"{0}{1}\">{2}</a></span>",
- relativePathToRoot, this.GetFinalTargetUrl(pathSpecification), this.Name));
+ relativePathToRoot, this.GetFinalTargetUrl(navigationContext.PathSpecification), this.Name));
}
if (!this.IsRoot)
{
diff --git a/markdownsupport.htm b/markdownsupport.htm
index b52f758..d12712f 100644
--- a/markdownsupport.htm
+++ b/markdownsupport.htm
@@ -47,9 +47,15 @@
Markdown support
DocNet Markdown extensions
diff --git a/search_index.json b/search_index.json
index 6117b49..42efbf1 100644
--- a/search_index.json
+++ b/search_index.json
@@ -9,13 +9,13 @@
{
"location": "docnetjson.htm",
"breadcrumbs": "Home / Configuration / Site configuration with the docnet.json file",
- "keywords": "__index _marker_ _Sub 1 1_ 2 3 3rd 4 a A above absolute actual alert all All always an and API appear are as assigned assumed Assumes auto Auto backwards be becomes Behaves below but by called can case characters clashes clean clicked compatibility configuration contain contains content convert converted ConvertLocalLinks copied copy couple create default Default defined described Destination destinationfolder determine Determines directive directives do docnet Docnet DocNet document documentation doesn e E each Each elements empty end ending entry escape every example Example executable exist exists expected expects extremely false feature file filename_page1 filename_page2 filename_page3 filename_page4 filenames files first folder folder1 foldern folders following foo footer Footer for form format forward from full Full g generate Generate generated getting given guarantees has have header Header Home href htm HTML if If image Images in include included includefolder Includes IncludeSource inclusion inclusions index info inside into introduction is isn it It its json later lead level Levels line link links list load loaded local located make markdown markdownextensions marker md more mostly name Name nameoflevel names navigated navigation no non Non not of one only optional or order output own page Page pages Pages PageTemplate parent parse party path paths Paths PathSpecification per placed process put puts recursively reference referene relative Relative RelativeAsFolder reliably resulting retrieved reusing right root same Search see See sensitive set setting shown simply site so somemarkdownfile source Source sourcefolder SourceFoldersToCopy special specified specifies specify started starting still straight string structure sub Sub subfolders suffixed target text that the The them theme Theme themefolder Themes there they this This title Title to tool tooling topics topictitle treated tree true unique urls use Use used useful uses using value want way what when where which wildcard will with within without wrapper written you",
+ "keywords": "__index _marker_ _Sub 1 1_ 2 3 3rd 4 a A above absolute actual additional alert all All always an and API appear are as assigned assumed Assumes auto Auto backwards be becomes Behaves below but by called can case characters clashes clean clicked compatibility configuration contain contains content Contents convert converted ConvertLocalLinks copied copy couple create default Default defined described Destination destinationfolder determine Determines directive directives do docnet Docnet DocNet document documentation doesn e E each Each elements empty end ending entry escape every example Example executable exist exists expected expects extremely false feature file filename_page1 filename_page2 filename_page3 filename_page4 filenames files first folder folder1 foldern folders following foo footer Footer for form format forward from full Full g generate Generate generated getting given guarantees has have header Header headings Home href htm HTML if If image Images in include included includefolder Includes IncludeSource inclusion inclusions index info inside into introduction is isn it It its json later lead level Levels line link links list load loaded local located make markdown markdownextensions marker MaxLevelInToC md more mostly name Name nameoflevel names navigated navigation never no non Non not Note of one only optional or order output own page Page pages Pages PageTemplate parent parse party path paths Paths PathSpecification per placed process put puts recursively reference referene relative Relative RelativeAsFolder reliably resulting retrieved reusing right root same Search see See sensitive set Sets setting show shown simply site so somemarkdownfile source Source sourcefolder SourceFoldersToCopy special specified specifies specify started starting still straight string structure sub Sub subfolders suffixed Table target text that the The them theme Theme themefolder Themes there they this This title Title titles to To ToC tool tooling topics topictitle treated tree true unique urls use Use used useful uses using value want way what when where which wildcard will with within without would wrapper written you",
"title": "Site configuration with the docnet.json file"
},
{
"location": "h2leveldiscovery.htm",
"breadcrumbs": "Home / Configuration / Automatic H2 level ToC entry discovery",
- "keywords": "a add all anchors as Automatic automatically below create discovery Docnet easy elements entry fine for grained H2 headers HTML in it It item level makes marked navigation output page sub the these This to ToC very well will",
+ "keywords": "1 a add alert all anchors are as Automatic automatically be behavior below by can configuration create discovery Docnet docnetjson easy elements end entry fine for grained H2 headers headings HTML in info it It item level makes marked MaxLevelInToC md navigation never Note option output overridden page shown sub that the these This titles to ToC very well will",
"title": "Automatic H2 level ToC entry discovery"
},
{
diff --git a/themes.htm b/themes.htm
index 8eb9e84..d9126f9 100644
--- a/themes.htm
+++ b/themes.htm
@@ -42,8 +42,13 @@
Themes
Writing content using Markdown
diff --git a/usage.htm b/usage.htm
index 6d7d40d..459c080 100644
--- a/usage.htm
+++ b/usage.htm
@@ -34,6 +34,9 @@
Usage
Configuration