We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab11ad2 commit d479a6dCopy full SHA for d479a6d
MyApp/Configure.Ssg.cs
@@ -58,6 +58,15 @@ public void Configure(IWebHostBuilder builder) => builder
58
// prerender with: `$ npm run prerender`
59
AppTasks.Register("prerender", args =>
60
{
61
+ // Force production mode
62
+ appHost.Config.DebugMode = false;
63
+
64
+ #if DEBUG
65
+ Console.WriteLine("Prerendering DEBUG...");
66
+ #else
67
+ Console.WriteLine("Prerendering !DEBUG...");
68
+ #endif
69
70
appHost.Resolve<MarkdownMeta>().RenderToAsync(
71
metaDir: appHost.ContentRootDirectory.RealPath.CombineWith("wwwroot/meta"),
72
baseUrl: HtmlHelpers.ToAbsoluteContentUrl("")).GetAwaiter().GetResult();
0 commit comments