Skip to content

Commit 8e19656

Browse files
authored
Ensure live reload picks up changes to docset and newly created files again (#90)
1 parent 93344cc commit 8e19656

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

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)