Tree.

WithPlaceholderFactory(Func<Object[], MetadataItems, IExecutionContext, IDocument>) Method

Summary

Allows you to specify a factory function for the creation of placeholder documents which get created to represent nodes in the tree for which there was no input document. The factory gets passed the current tree path, the set of tree metadata that should be set in the document, and the execution context which can be used to create a new document. If the factory function returns null, a new document with the tree metadata is created.
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Modules.Metadata
Containing Type
Tree

Syntax

public Tree WithPlaceholderFactory(Func<Object[], MetadataItems, IExecutionContext, IDocument> factory)

Remarks

The default placeholder factory creates a document at the current tree path with a file name of index.html.

Parameters

Name Type Description
factory Func<Object[], MetadataItems, IExecutionContext, IDocument> The factory function.

Return Value

Type Description
Tree The current module instance.
GitHub