-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d87f7d2
commit 48634dd
Showing
5 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Linq; | ||
using Statiq.Common; | ||
using Statiq.Core; | ||
using Statiq.Html; | ||
|
||
namespace Statiq.Web.Pipelines | ||
{ | ||
public class LinkValidation : Pipeline | ||
{ | ||
public LinkValidation() | ||
{ | ||
Deployment = true; | ||
|
||
ExecutionPolicy = ExecutionPolicy.Normal; | ||
|
||
Dependencies.AddRange(nameof(Content), nameof(Archives)); | ||
|
||
OutputModules = new ModuleList | ||
{ | ||
new ReplaceDocuments(Dependencies.ToArray()), | ||
new ValidateLinks() | ||
.ValidateRelativeLinks(Config.FromSetting<bool>(WebKeys.ValidateRelativeLinks)) | ||
.ValidateAbsoluteLinks(Config.FromSetting<bool>(WebKeys.ValidateAbsoluteLinks)) | ||
.AsError(Config.FromSetting<bool>(WebKeys.ValidateLinksAsError)) | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters