FrontMatter Class

Summary

Extracts the first part of content for each document and sends it to a child module for processing.
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Modules.Control
Interfaces
Base Types
graph TD Base0["ContainerModule"]-->Type click Base0 "/api/Wyam.Common.Modules/ContainerModule" Base1["object"]-->Base0 Interface0["IModule"]-.->Type click Interface0 "/api/Wyam.Common.Modules/IModule" Interface1["IModuleList"]-.->Type click Interface1 "/api/Wyam.Common.Modules/IModuleList" Interface2["IList<>"]-.->Type Type["FrontMatter"] class Type type-node

Syntax

public class FrontMatter : ContainerModule, IModule, IModuleList, IList<IModule>

Remarks

This module is typically used in conjunction with the Yaml module to enable putting YAML front matter in a file. First, the content of each input document is scanned for a line that consists entirely of the delimiter character or (- by default) or the delimiter string. Once found, the content before the delimiter is passed to the specified child modules. Any metadata from the child module output document(s) is added to the input document. Note that if the child modules result in more than one output document, multiple clones of the input document will be made for each one. The output document content is set to the original content without the front matter.

Constructors

Name Summary
FrontMatter(char, IEnumerable<>) Uses the specified delimiter character and passes any front matter to the specified child modules for processing.
FrontMatter(char, IModule[]) Uses the specified delimiter character and passes any front matter to the specified child modules for processing.
FrontMatter(IEnumerable<>) Uses the default delimiter character and passes any front matter to the specified child modules for processing.
FrontMatter(IModule[]) Uses the default delimiter character and passes any front matter to the specified child modules for processing.
FrontMatter(string, IEnumerable<>) Uses the specified delimiter string and passes any front matter to the specified child modules for processing.
FrontMatter(string, IModule[]) Uses the specified delimiter string and passes any front matter to the specified child modules for processing.

Properties

Name Value Summary
Count int
Inherited from ContainerModule
IsReadOnly bool
Inherited from ContainerModule
this[int] IModule
Inherited from ContainerModule
this[string] IModule
Gets the module with the specified name.
Inherited from ContainerModule

Methods

Name Value Summary
Add(IModule) void
Inherited from ContainerModule
Add(IModule[]) void
Adds modules to the list. Any null items in the sequence of modules will be discarded.
Inherited from ContainerModule
Add(string, IModule) void
Adds a module to the list with a specified name.
Inherited from ContainerModule
AsKeyValuePairs() IEnumerable<>
Inherited from ContainerModule
Clear() void
Inherited from ContainerModule
Contains(IModule) bool
Inherited from ContainerModule
Contains(string) bool
Determines if the list contains a module with the specified name.
Inherited from ContainerModule
CopyTo(IModule[], int) void
Inherited from ContainerModule
Execute(IReadOnlyList<>, IExecutionContext) IEnumerable<>
Execute(IReadOnlyList<>, IExecutionContext) IEnumerable<>
Inherited from ContainerModule
GetEnumerator() IEnumerator<>
Inherited from ContainerModule
IgnoreDelimiterOnFirstLine(bool) FrontMatter
Ignores the delimiter if it appears on the first line. This is useful when processing Jekyll style front matter that has the delimiter both above and below the front matter content. The default behavior is true.
IndexOf(IModule) int
Inherited from ContainerModule
IndexOf(string) int
Gets the index of the module with the specified name.
Inherited from ContainerModule
Insert(int, IModule) void
Inherited from ContainerModule
Insert(int, IModule[]) void
Inserts modules into the list. Any null items in the sequence of modules will be discarded.
Inherited from ContainerModule
Insert(int, string, IModule) void
Inserts a module into the list with a specified name.
Inherited from ContainerModule
Remove(IModule) bool
Inherited from ContainerModule
Remove(string) bool
Removes a module by name.
Inherited from ContainerModule
RemoveAt(int) void
Inherited from ContainerModule
TryGetValue(string, IModule) bool
Attempts to get a module with the specified name.
Inherited from ContainerModule
GitHub