Skip to content

Commit

Permalink
upgrade to latest markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Feb 29, 2024
1 parent d9634ef commit 87c2f0c
Show file tree
Hide file tree
Showing 6 changed files with 385 additions and 91 deletions.
3 changes: 3 additions & 0 deletions MyApp/Configure.Ssg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public void Configure(IWebHostBuilder builder) => builder
context.Configuration.GetSection(nameof(AppConfig)).Bind(AppConfig.Instance);
services.AddSingleton(AppConfig.Instance);
services.AddSingleton<RazorPagesEngine>();
services.AddSingleton<MarkdownIncludes>();
services.AddSingleton<MarkdownPages>();
services.AddSingleton<MarkdownWhatsNew>();
services.AddSingleton<MarkdownVideos>();
Expand All @@ -41,13 +42,15 @@ public void Configure(IWebHostBuilder builder) => builder
}
});

var includes = appHost.Resolve<MarkdownIncludes>();
var pages = appHost.Resolve<MarkdownPages>();
var whatsNew = appHost.Resolve<MarkdownWhatsNew>();
var videos = appHost.Resolve<MarkdownVideos>();
var meta = appHost.Resolve<MarkdownMeta>();

meta.Features = [pages, whatsNew, videos];

includes.LoadFrom("_includes");
pages.LoadFrom("_pages");
whatsNew.LoadFrom("_whatsnew");
videos.LoadFrom("_videos");
Expand Down
Loading

0 comments on commit 87c2f0c

Please sign in to comment.