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<T>"]-.->Type Interface3["ICollection<T>"]-.->Type Interface4["IEnumerable<T>"]-.->Type Interface5["IEnumerable"]-.->Type Type["FrontMatter"] class Type type-node

Syntax

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

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<IModule>) 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<IModule>) 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<IModule>) 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<T>
Returns the list as a sequence of key-value pairs with the keys being the module names and the values being the module instances.
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<IDocument>, IExecutionContext) IEnumerable<T>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
GetEnumerator() IEnumerator<T>
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

Extension Methods

Name Value Summary
AddRange<IModule>(IEnumerable<IModule>) void
Adds a range of values to a collection.
Append<FrontMatter>(IModule[]) TModuleList
Appends modules.
Append<FrontMatter>(string, IModule) TModuleList
Appends a named module.
GroupByMany<IModule, TKey, TElement>(Func<IModule, IEnumerable<TKey>>, Func<IModule, TElement>) IEnumerable<T>
Groups the elements of a sequence according to a specified key selector function that returns a sequence of keys and projects the elements for each group by using a specified function.
GroupByMany<IModule, TKey, TElement>(Func<IModule, IEnumerable<TKey>>, Func<IModule, TElement>, IEqualityComparer<TKey>) IEnumerable<T>
Groups the elements of a sequence according to a specified key selector function that returns a sequence of keys. The keys are compared by using a comparer and each group's elements are projected by using a specified function.
GroupByMany<IModule, TKey>(Func<IModule, IEnumerable<TKey>>) IEnumerable<T>
Groups the elements of a sequence according to a specified key selector function that returns a sequence of keys.
GroupByMany<IModule, TKey>(Func<IModule, IEnumerable<TKey>>, IEqualityComparer<TKey>) IEnumerable<T>
Groups the elements of a sequence according to a specified key selector function that returns a sequence of keys and compares the keys by using a specified comparer.
GroupByManyToMany<IModule, TKey, TElement>(Func<IModule, IEnumerable<TKey>>, Func<IModule, IEnumerable<TElement>>) IEnumerable<T>
Groups the elements of a sequence according to a specified key selector function that returns a sequence of keys and projects the elements for each group by using a specified function that returns a sequence of elements.
GroupByManyToMany<IModule, TKey, TElement>(Func<IModule, IEnumerable<TKey>>, Func<IModule, IEnumerable<TElement>>, IEqualityComparer<TKey>) IEnumerable<T>
Groups the elements of a sequence according to a specified key selector function that returns a sequence of keys. The keys are compared by using a comparer and each group's elements are projected by using a specified function that returns a sequence of elements.
InsertAfter<FrontMatter>(string, IModule[]) TModuleList
Inserts modules after the module with the specified name.
InsertAfter<FrontMatter>(string, string, IModule) TModuleList
Inserts modules after the module with the specified name.
InsertAfterFirst<T>(IModule[]) IModuleList
Inserts modules after the first module in the list of the specified type.
InsertAfterFirst<T>(Predicate<T>, IModule[]) IModuleList
Inserts modules after the first module in the list of the specified type that satisfies a predicate.
InsertAfterFirst<T>(Predicate<T>, string, IModule) IModuleList
Inserts modules after the first module in the list of the specified type that satisfies a predicate.
InsertAfterFirst<T>(string, IModule) IModuleList
Inserts modules after the first module in the list of the specified type.
InsertAfterLast<T>(IModule[]) IModuleList
Inserts modules after the last module in the list of the specified type.
InsertAfterLast<T>(Predicate<T>, IModule[]) IModuleList
Inserts modules after the last module in the list of the specified type that satisfies a predicate.
InsertAfterLast<T>(Predicate<T>, string, IModule) IModuleList
Inserts modules after the last module in the list of the specified type that satisfies a predicate.
InsertAfterLast<T>(string, IModule) IModuleList
Inserts modules after the last module in the list of the specified type.
InsertBefore<FrontMatter>(string, IModule[]) TModuleList
Inserts modules before the module with the specified name.
InsertBefore<FrontMatter>(string, string, IModule) TModuleList
Inserts modules before the module with the specified name.
InsertBeforeFirst<T>(IModule[]) IModuleList
Inserts modules before the first module in the list of the specified type.
InsertBeforeFirst<T>(Predicate<T>, IModule[]) IModuleList
Inserts modules before the first module in the list of the specified type that satisfies a predicate.
InsertBeforeFirst<T>(Predicate<T>, string, IModule) IModuleList
Inserts modules before the first module in the list of the specified type that satisfies a predicate.
InsertBeforeFirst<T>(string, IModule) IModuleList
Inserts modules before the first module in the list of the specified type.
InsertBeforeLast<T>(IModule[]) IModuleList
Inserts modules before the last module in the list of the specified type.
InsertBeforeLast<T>(Predicate<T>, IModule[]) IModuleList
Inserts modules before the last module in the list of the specified type that satisfies a predicate.
InsertBeforeLast<T>(Predicate<T>, string, IModule) IModuleList
Inserts modules before the last module in the list of the specified type that satisfies a predicate.
InsertBeforeLast<T>(string, IModule) IModuleList
Inserts modules before the last module in the list of the specified type.
Modify<FrontMatter>(int, Action<IModule>) TModuleList
Modifies an inner module list with the specified index.
Modify<FrontMatter>(string, Action<IModule>) TModuleList
Modifies an inner module with the specified name.
Prepend<FrontMatter>(IModule[]) TModuleList
Prepends modules.
Prepend<FrontMatter>(string, IModule) TModuleList
Prepends a named module.
RemoveAll<IModule>(Func<IModule, bool>) int
Removes all items that match a predicate from a collection.
Replace<FrontMatter>(int, IModule, string) TModuleList
Replaces a module at the specified index.
Replace<FrontMatter>(string, IModule, string) TModuleList
Replaces a module with the specified name. The replacement module will have the same name as the module being replaced unless an alternate name is specified.
ReplaceFirst<T>(IModule, string) IModuleList
Replaces the first module in the list of the specified type.
ReplaceFirst<T>(Predicate<T>, IModule, string) IModuleList
Replaces the first module in the list of the specified type that satisfies a predicate.
ReplaceLast<T>(IModule, string) IModuleList
Replaces the last module in the list of the specified type.
ReplaceLast<T>(Predicate<T>, IModule, string) IModuleList
Replaces the last module in the list of the specified type that satisfies a predicate.
ToLookupMany<IModule, TKey, TElement>(Func<IModule, IEnumerable<TKey>>, Func<IModule, TElement>) ILookup<,>
Creates a lookup from a sequence according to a specified key selector function that returns a sequence of keys and projects the elements for each group by using a specified function.
ToLookupMany<IModule, TKey, TElement>(Func<IModule, IEnumerable<TKey>>, Func<IModule, TElement>, IEqualityComparer<TKey>) ILookup<,>
Creates a lookup from a sequence according to a specified key selector function that returns a sequence of keys. The keys are compared by using a comparer and each group's elements are projected by using a specified function.
ToLookupMany<IModule, TKey>(Func<IModule, IEnumerable<TKey>>) ILookup<,>
Creates a lookup from a sequence according to a specified key selector function that returns a sequence of keys.
ToLookupMany<IModule, TKey>(Func<IModule, IEnumerable<TKey>>, IEqualityComparer<TKey>) ILookup<,>
Creates a lookup from a sequence according to a specified key selector function that returns a sequence of keys and compares the keys by using a specified comparer.
ToLookupManyToMany<IModule, TKey, TElement>(Func<IModule, IEnumerable<TKey>>, Func<IModule, IEnumerable<TElement>>) ILookup<,>
Creates a lookup from a sequence according to a specified key selector function that returns a sequence of keys and projects the elements for each group by using a specified function that returns a sequence of elements.
ToLookupManyToMany<IModule, TKey, TElement>(Func<IModule, IEnumerable<TKey>>, Func<IModule, IEnumerable<TElement>>, IEqualityComparer<TKey>) ILookup<,>
Creates a lookup from a sequence according to a specified key selector function that returns a sequence of keys. The keys are compared by using a comparer and each group's elements are projected by using a specified function that returns a sequence of elements.
WithName(string) IModule
GitHub