ContentFormatOptions
Pennington.Infrastructure
Options for a custom content-format source registered via AddContentFormat.
Properties
BasePageUrlstring- URL prefix prepended to routes generated from this source.
ContentPathstring- Filesystem path to the directory containing the format's source files.
ExcludePathsImmutableArray<string>- Relative subpaths (from
ContentPath) to skip during discovery. FilePatternstring- Glob pattern used to enumerate source files (for example
*.cook). SectionLabelstring- Default section label applied when front matter does not specify one.
Methods
UseParser<TParser>
#public ContentFormatOptions UseParser<TParser>()
Sets the IContentParser type that parses this format's files (resolved from DI).
Returns
ContentFormatOptionsUseRenderer<TRenderer>
#public ContentFormatOptions UseRenderer<TRenderer>()
Sets the IContentRenderer type that renders this format's parsed items (resolved from DI).
Returns
ContentFormatOptionsPennington.Infrastructure.ContentFormatOptions
namespace Pennington.Infrastructure;
/// Options for a custom content-format source registered via AddContentFormat.
public class ContentFormatOptions
{
/// URL prefix prepended to routes generated from this source.
public string BasePageUrl { get; set; }
/// Filesystem path to the directory containing the format's source files.
public string ContentPath { get; set; }
/// Relative subpaths (from ContentPath) to skip during discovery.
public ImmutableArray<string> ExcludePaths { get; set; }
/// Glob pattern used to enumerate source files (for example *.cook).
public string FilePattern { get; set; }
/// Default section label applied when front matter does not specify one.
public string SectionLabel { get; set; }
/// Sets the IContentParser type that parses this format's files (resolved from DI).
public ContentFormatOptions UseParser<TParser>()
;
/// Sets the IContentRenderer type that renders this format's parsed items (resolved from DI).
public ContentFormatOptions UseRenderer<TRenderer>()
;
}