Creates a file provider for a sequence of documents.
- Namespace
- Statiq
.Common - Containing Type
- DocumentFileProvider
Syntax
public DocumentFileProvider(IEnumerable<IDocument> documents, bool source, bool flatten = true, string childrenKey = "Children")
Remarks
This constructor does not flatten the documents. Only the top-level sequence
(usually the parent-most documents) will be part of the file provider.
Parameters
Name | Type | Description |
---|---|---|
documents | IEnumerable |
The documents to provide virtual directories and files for. |
source | bool |
true to use Source as the basis for paths,
false to use Destination .
|
flatten | bool |
true to flatten the documents, false otherwise.
If false only the top-level sequence (usually the parent-most documents) will be part of the file provider.
|
childrenKey | string |
The metadata key that contains the children or null to flatten documents in all metadata keys.
This parameter has no effect if flatten is false .
|