This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

ContentFormatOptions Pennington.Infrastructure

Options for a custom content-format source registered via AddContentFormat.

Properties

BasePageUrl string
URL prefix prepended to routes generated from this source.
ContentPath string
Filesystem path to the directory containing the format's source files.
ExcludePaths ImmutableArray<string>
Relative subpaths (from ContentPath) to skip during discovery.
FilePattern string
Glob pattern used to enumerate source files (for example *.cook).
SectionLabel string
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

ContentFormatOptions

UseRenderer<TRenderer>

#
public ContentFormatOptions UseRenderer<TRenderer>()

Sets the IContentRenderer type that renders this format's parsed items (resolved from DI).

Returns

ContentFormatOptions

Pennington.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>()
; }