Browse Source

Add a StartingPageName setting

This setting makes the name of the "Home" page configurable.
Example usage in docnet.json:

    "StartingPageName": "Getting Started",
pull/80/head
Martin Enzelsberger 7 years ago
parent
commit
80cd4e0124
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      src/DocNet/Config.cs

+ 10
- 1
src/DocNet/Config.cs View File

@@ -218,6 +218,15 @@ namespace Docnet
}
}

public string StartingPageName
{
get
{
string rawName = _configData.StartingPageName;
return string.IsNullOrWhiteSpace(rawName) ? "Home" : rawName;
}
}

public string IncludeFolder
{
get
@@ -336,7 +345,7 @@ namespace Docnet
if(_pages == null)
{
JObject rawPages = _configData.Pages;
_pages = new NavigationLevel(Source) {Name = "Home", IsRoot = true};
_pages = new NavigationLevel(Source) {Name = StartingPageName, IsRoot = true};
_pages.Load(rawPages);
}
return _pages;


Loading…
Cancel
Save