Skip to content

Commit

Permalink
Update Markdown.Blog.cs
Browse files Browse the repository at this point in the history
Enabling anchor links
  • Loading branch information
zack4485 authored Oct 31, 2024
1 parent 53e86f9 commit 9db485d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MyApp/Markdown.Blog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public string GetSplashImage(MarkdownFileInfo post)
var content = file.ReadAllText();

var writer = new StringWriter();
var doc = CreateMarkdownFile(content, writer, pipeline);
var doc = CreateMarkdownFile(path, content, writer, pipeline);
if (doc.Title == null)
{
log.LogWarning("No frontmatter found for {VirtualPath}, ignoring...", file.VirtualPath);
Expand Down Expand Up @@ -155,7 +155,7 @@ public void LoadFrom(string fromDirectory)
var files = VirtualFiles.GetDirectory(fromDirectory).GetAllFiles().ToList();
log.LogInformation("Found {Count} posts", files.Count);

var pipeline = CreatePipeline();
var pipeline = CreatePipeline(string.Empty);

foreach (var file in files)
{
Expand Down Expand Up @@ -189,4 +189,4 @@ public void LoadFrom(string fromDirectory)

public override List<MarkdownFileBase> GetAll() =>
VisiblePosts.Map(doc => ToMetaDoc(doc, x => x.Url ??= $"/posts/{x.Slug}"));
}
}

0 comments on commit 9db485d

Please sign in to comment.