Skip to content

Commit 7a4600d

Browse files
committed
Handle the case where there is no root index.md file
1 parent fb923ee commit 7a4600d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Elastic.Markdown/Slices/HtmlWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ private async Task<string> RenderNavigation(ConfigurationFile configuration, str
2222

2323
var slice = Layout._TocTree.Create(new NavigationViewModel
2424
{
25-
Title = group?.Index?.NavigationTitle ?? DocumentationSet.Tree.Index!.NavigationTitle!,
26-
TitleUrl = group?.Index?.Url ?? DocumentationSet.Tree.Index!.Url,
25+
Title = group?.Index?.NavigationTitle ?? DocumentationSet.Tree.Index?.NavigationTitle ?? "Docs",
26+
TitleUrl = group?.Index?.Url ?? DocumentationSet.Tree.Index?.Url ?? "#",
2727
Tree = group ?? DocumentationSet.Tree,
2828
CurrentDocument = markdown,
2929
IsRoot = topLevelGroupId == DocumentationSet.Tree.Id,

0 commit comments

Comments
 (0)