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

MarkdownContentServiceOptions Pennington.Content

Configuration for a markdown content source.

Properties

BasePageUrl UrlPath
URL prefix prepended to routes generated from this content directory.
ContentPath FilePath
required
Filesystem path to the directory containing markdown files.
ExcludePaths ImmutableArray<string>
Relative paths (forward-slash, from ContentPath) whose subtrees should be skipped during discovery and content copying. Use this when another content source already owns a subfolder — e.g. a default DocFrontMatter source rooted at Content can set ExcludePaths = ["changelog"] so a specialized ChangelogFrontMatter source rooted at Content/changelog is the sole owner of that subtree. Matching is case-insensitive and segment-based: "a/b" excludes a/b and anything beneath it, but not a/bcd.
FilePattern string
Glob pattern used to enumerate source files (defaults to *.md).
Format string
Dispatch key stamped on this source's discovered items so the pipeline routes them to this source's front-matter parser rather than a shared one. The host assigns a distinct key per markdown source via SourceKey; defaults to the shared Key for standalone construction.
Locale string
Locale code associated with single-locale content (ignored when multi-locale routing is active).
ReserveNotFoundPage bool
When true, a content-root-level 404.md (and its per-locale {locale}/404.md sibling) is skipped during discovery so it never becomes a routable page or appears in navigation, the sitemap, search, llms.txt, or build output. Host templates (DocSite, BlogSite) render the file's body on demand as the not-found page instead. Nested 404.md files (e.g. guides/404.md) stay ordinary pages. Bare hosts leave this false, keeping 404.md a normal route.
SearchPriority int
Relative ordering priority for this source's entries in the search index.
SectionLabel string
Default section label applied to discovered items when front matter doesn't specify one.

Pennington.Content.MarkdownContentServiceOptions

namespace Pennington.Content;

/// Configuration for a markdown content source.
public class MarkdownContentServiceOptions
{
    /// URL prefix prepended to routes generated from this content directory.
    
public UrlPath BasePageUrl { get; set; }
/// Filesystem path to the directory containing markdown files.
public FilePath ContentPath { get; set; }
/// Relative paths (forward-slash, from ContentPath) whose subtrees should be skipped during discovery and content copying. Use this when another content source already owns a subfolder — e.g. a default DocFrontMatter source rooted at Content can set ExcludePaths = ["changelog"] so a specialized ChangelogFrontMatter source rooted at Content/changelog is the sole owner of that subtree. Matching is case-insensitive and segment-based: "a/b" excludes a/b and anything beneath it, but not a/bcd.
public ImmutableArray<string> ExcludePaths { get; set; }
/// Glob pattern used to enumerate source files (defaults to *.md).
public string FilePattern { get; set; }
/// Dispatch key stamped on this source's discovered items so the pipeline routes them to this source's front-matter parser rather than a shared one. The host assigns a distinct key per markdown source via SourceKey; defaults to the shared Key for standalone construction.
public string Format { get; set; }
/// Locale code associated with single-locale content (ignored when multi-locale routing is active).
public string Locale { get; set; }
/// When true, a content-root-level 404.md (and its per-locale {locale}/404.md sibling) is skipped during discovery so it never becomes a routable page or appears in navigation, the sitemap, search, llms.txt, or build output. Host templates (DocSite, BlogSite) render the file's body on demand as the not-found page instead. Nested 404.md files (e.g. guides/404.md) stay ordinary pages. Bare hosts leave this false, keeping 404.md a normal route.
public bool ReserveNotFoundPage { get; set; }
/// Relative ordering priority for this source's entries in the search index.
public int SearchPriority { get; set; }
/// Default section label applied to discovered items when front matter doesn't specify one.
public string SectionLabel { get; set; }
}