| @@ -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; | |||
| } | |||
| @@ -39,7 +39,11 @@ | |||
| <li class="tocentry current"><a class="current" href="docnetjson.htm">Site configuration with the docnet.json file</a> | |||
| <ul class="currentrelative"> | |||
| <li class="tocentry"><a href="#levels-without-index-defined">Levels without __index defined</a></li> | |||
| <li class="tocentry"><a href="#use-of-wildcard-inclusions">Use of wildcard inclusions</a></li> | |||
| </ul> | |||
| <li class="tocentry"><a href="h2leveldiscovery.htm">Automatic H2 level ToC entry discovery</a> | |||
| </li> | |||
| @@ -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 @@ | |||
| <li><code>RelativeAsFolder</code>: Behaves the same as <code>Relative</code>, but puts <em>every</em> source md in its own folder resulting in clean navigation urls (e.g. <code>/getting-started/introduction.htm</code> becomes <code>/getting-started/introduction/index.htm</code>)</li> | |||
| </ul> | |||
| </li> | |||
| <li><code>MaxLevelInToC</code>. Sets the level of headings to show in the Table of Contents (ToC). The default value is <code>2</code>. To show one additional level, one would use <code>3</code> for this value. <em>Note that level 1 headings (titles) are never shown in the ToC).</em></li> | |||
| <li><code>Footer</code>. This is text and/or HTML which is placed in the footer of each page, using a <em>marker</em> (see below).</li> | |||
| <li><code>Pages</code> 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 <code>Source</code>. A file <code>foo.md</code> will be generated as <code>foo.htm</code> in the output. </li> | |||
| </ul> | |||
| @@ -79,7 +79,9 @@ | |||
| <div class="section"> | |||
| <h1 id="automatic-h2-level-toc-entry-discovery">Automatic H2 level ToC entry discovery<a class="headerlink" href="#automatic-h2-level-toc-entry-discovery" title="Permalink to this headline"><i class="fa fa-link" aria-hidden="true"></i></a></h1> | |||
| <p><code>Docnet</code> will automatically add all H2 (<code>##</code> 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.</p> | |||
| <p>This behavior can be overridden by the <code>MaxLevelInToC</code> <a href="./docnetjson.htm">configuration option</a>.</p> | |||
| <div class="alert alert-info"><span class="alert-title"><i class="fa fa-info-circle"></i> Info</span><p>Note that level 1 headings (titles) are never shown in the ToC).</p> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <footer> | |||
| @@ -49,10 +49,17 @@ | |||
| <li class="tocentry current"><a class="current" href="markdownextensions.htm">DocNet Markdown extensions</a> | |||
| <ul class="currentrelative"> | |||
| <li class="tocentry"><a href="#alert-boxes">Alert boxes</a></li> | |||
| <li class="tocentry"><a href="#font-awesome-icons">Font Awesome icons</a></li> | |||
| <li class="tocentry"><a href="#tabs">Tabs</a></li> | |||
| <li class="tocentry"><a href="#snippets">Snippets</a></li> | |||
| <li class="tocentry"><a href="#include-files">Include files</a></li> | |||
| </ul> | |||
| </ul> | |||
| @@ -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) | |||
| { | |||
| @@ -47,9 +47,15 @@ | |||
| <li class="tocentry current"><a class="current" href="markdownsupport.htm">Markdown support</a> | |||
| <ul class="currentrelative"> | |||
| <li class="tocentry"><a href="#standard-markdown">Standard Markdown</a></li> | |||
| <li class="tocentry"><a href="#php-markdown-extra">Php Markdown Extra</a></li> | |||
| <li class="tocentry"><a href="#highlighting-code">Highlighting code</a></li> | |||
| <li class="tocentry"><a href="#linking">Linking</a></li> | |||
| </ul> | |||
| <li class="tocentry"><a href="markdownextensions.htm">DocNet Markdown extensions</a> | |||
| </li> | |||
| @@ -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" | |||
| }, | |||
| { | |||
| @@ -42,8 +42,13 @@ | |||
| <li class="tocentry current"><a class="current" href="themes.htm">Themes</a> | |||
| <ul class="currentrelative"> | |||
| <li class="tocentry"><a href="#themes-folder">Themes folder</a></li> | |||
| <li class="tocentry"><a href="#default-theme">Default theme</a></li> | |||
| <li class="tocentry"><a href="#pagetemplate.htm">PageTemplate.htm</a></li> | |||
| </ul> | |||
| <li class="tocentry"> | |||
| <span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="WritingcontentusingMarkdown.htm">Writing content using Markdown</a></span> | |||
| @@ -34,6 +34,9 @@ | |||
| <li class="tocentry current"><a class="current" href="usage.htm">Usage</a> | |||
| <ul class="currentrelativeroot"> | |||
| <li class="tocentry"><a href="#requirements">Requirements</a></li> | |||
| </ul> | |||
| <li class="tocentry"> | |||
| <span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="Configuration.htm">Configuration</a></span> | |||