Skip to content

Commit 754686a

Browse files
committed
Fallback to relative path for title and navigation title
1 parent fada00e commit 754686a

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

docs/source/docset.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ toc:
4545
children:
4646
- folder: content
4747
- file: index.md
48+
- file: test.md
4849
- folder: versioning

src/Elastic.Markdown/IO/MarkdownFile.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ private void ReadDocumentInstructions(MarkdownDocument document)
7272
Title = YamlFrontMatter.Title;
7373
NavigationTitle = YamlFrontMatter.NavigationTitle;
7474
}
75+
else
76+
{
77+
Title = RelativePath;
78+
NavigationTitle = RelativePath;
79+
}
7580

7681
var contents = document
7782
.Where(block => block is HeadingBlock { Level: 2 })

src/docs-builder/Http/ReloadGeneratorService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ private void OnChanged(object sender, FileSystemEventArgs e)
6666

6767
if (e.FullPath.EndsWith("docset.yml"))
6868
Reload();
69+
if (e.FullPath.EndsWith(".md"))
70+
Reload();
6971

7072
Logger.LogInformation($"Changed: {e.FullPath}");
7173
}

0 commit comments

Comments
 (0)