Identifies front matter using one or more regular expressions
and passes any front matter to the specified child modules for processing.
- Namespace
- Statiq
.Core - Containing Type
- ExtractFrontMatter
Syntax
public ExtractFrontMatter(Config<IEnumerable<string>> regexes, params IModule[] modules)
Remarks
If a group named "frontmatter" is returned from the regex, it will be used for front matter
content. Otherwise, the first group will be used.
The provided regular expressions are evaluated with both the
RegexOptions.Singleline
and RegexOptions.Multiline
options.
To use different options, supply Regex
instances using the alternate constructor.
Parameters
Name | Type | Description |
---|---|---|
regexes | Config |
The regular expressions to use to find the front matter. |
modules | IModule[] | The modules to execute against the front matter. |