Meta Class

Summary

Adds the specified metadata to each input document.
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Modules.Metadata
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IModule"] click Interface0 "/api/Wyam.Common.Modules/IModule" Type["Meta"] class Type type-node

Syntax

public class Meta : IModule

Constructors

Name Summary
Meta(IModule[]) The specified modules are executed against an empty initial document and all metadata that exist in all of the result documents are added as metadata to each input document.
Meta(string, ContextConfig) Uses a function to determine an object to be added as metadata for each document. This allows you to specify different metadata for each document depending on the context.
Meta(string, DocumentConfig) Uses a function to determine an object to be added as metadata for each document. This allows you to specify different metadata for each document depending on the input.
Meta(string, Object) The specified object is added as metadata for the specified key for every input document.

Methods

Name Value Summary
Execute(IReadOnlyList<IDocument>, IExecutionContext) IEnumerable<IDocument>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
ForEachDocument(bool) Meta
Specifies that the whole sequence of modules should be executed for every input document (as opposed to the default behavior of the sequence of modules only being executed once with an empty initial document). This method has no effect if no modules are specified.
IgnoreNull(bool) Meta
Ignores null values and does not add a metadata item for them.
OnlyIfNonExisting(bool) Meta
Only sets the new metadata value if a value doesn't already exist. The default behavior is to set the new value regardless.
GitHub