Skip to content

Commit

Permalink
Fixed xref pipelines and front matter ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
daveaglick committed Mar 7, 2022
1 parent 91a3221 commit 4c23f91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Statiq.Web/Bootstrapper/BootstrapperExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ private static TBootstrapper AddDefaultWebSettings<TBootstrapper>(this TBootstra
WebKeys.XrefPipelines,
new string[]
{
// We don't need to include the Api pipeline from Statiq Docs because it's a dependency of Content
nameof(Pipelines.Content),
nameof(Pipelines.Assets),
nameof(Pipelines.Data),
nameof(Pipelines.Archives),
nameof(Pipelines.Feeds),
"api" // to support Statiq Docs
nameof(Pipelines.Feeds)
}
},
{ WebKeys.Xref, Config.FromDocument(doc => doc.GetTitle()?.Replace(' ', '-')) }, // Not all documents have a title (I.e. no title metadata and no source)
Expand All @@ -173,10 +173,10 @@ private static TBootstrapper AddDefaultWebSettings<TBootstrapper>(this TBootstra
WebKeys.FrontMatterRegexes,
new string[]
{
ExtractFrontMatter.GetDelimiterRegex("-", true), // Jekyll-style: --- ... ---
@"\A(?:^\r*/\*-+[^\S\n]*$\r?\n)(.*?)(?:^\r*-+\*/[^\S\n]*$\r?\n)", // C-style: /*- ... -*/
@"\A(?:^\r*<!---+[^\S\n]*$\r?\n)(.*?)(?:^\r*-+-->[^\S\n]*$\r?\n)", // HTML-style: <!--- ... ---!>
@"\A(?:^\r*@\*-+[^\S\n]*$\r?\n)(.*?)(?:^\r*-+\*@[^\S\n]*$\r?\n)", // Razor-style: @*- ... -*@
ExtractFrontMatter.GetDelimiterRegex("-", true), // Jekyll-style: --- ... ---, comes last since it's more general and doesn't require a start delimiter
}
}
});
Expand Down

0 comments on commit 4c23f91

Please sign in to comment.