Skip to content
This repository was archived by the owner on Apr 7, 2024. It is now read-only.

Commit 939ea68

Browse files
committed
Solves issue #66, where 404 page is not returning status code 404.
Only published content was generated BUT it would generate a index.html page with content of the 404 page.
1 parent 81c6991 commit 939ea68

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ScheduledJobs/StaticWebScheduledJob.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,11 @@ protected void AddAllPagesInAllLanguagesForConfiguration(SiteConfigurationElemen
350350

351351
var langContentLink = langPage.ContentLink.ToReferenceWithoutVersion();
352352

353+
if (!page.CheckPublishedStatus(PagePublishedStatus.Published))
354+
{
355+
ignorePage = true;
356+
}
357+
353358
// This page type has a conditional for when we should generate it
354359
if (langPage is IStaticWebIgnoreGenerateDynamically generateDynamically)
355360
{

0 commit comments

Comments
 (0)