@@ -16,7 +16,7 @@ namespace Elastic.Markdown.IO;
1616public class MarkdownFile : DocumentationFile
1717{
1818 private readonly SlugHelper _slugHelper = new ( ) ;
19- private string ? _tocTitle ;
19+ private string ? _navigationTitle ;
2020
2121 public MarkdownFile ( IFileInfo sourceFile , IDirectoryInfo rootPath , MarkdownParser parser , BuildContext context )
2222 : base ( sourceFile , rootPath )
@@ -32,10 +32,10 @@ public MarkdownFile(IFileInfo sourceFile, IDirectoryInfo rootPath, MarkdownParse
3232 private FrontMatterParser FrontMatterParser { get ; } = new ( ) ;
3333 public YamlFrontMatter ? YamlFrontMatter { get ; private set ; }
3434 public string ? Title { get ; private set ; }
35- public string ? TocTitle
35+ public string ? NavigationTitle
3636 {
37- get => ! string . IsNullOrEmpty ( _tocTitle ) ? _tocTitle : Title ;
38- set => _tocTitle = value ;
37+ get => ! string . IsNullOrEmpty ( _navigationTitle ) ? _navigationTitle : Title ;
38+ private set => _navigationTitle = value ;
3939 }
4040
4141 public List < PageTocItem > TableOfContents { get ; } = new ( ) ;
@@ -53,6 +53,7 @@ public async Task<MarkdownDocument> ParseFullAsync(Cancel ctx)
5353 var raw = string . Join ( Environment . NewLine , yaml . Lines . Lines ) ;
5454 YamlFrontMatter = FrontMatterParser . Deserialize ( raw ) ;
5555 Title = YamlFrontMatter . Title ;
56+ NavigationTitle = YamlFrontMatter . NavigationTitle ;
5657 }
5758
5859 var contents = document
0 commit comments