MarkdownContentServiceOptions
Pennington.Content
Configuration for a markdown content source.
Properties
BasePageUrlUrlPath- URL prefix prepended to routes generated from this content directory.
ContentPathFilePath- requiredFilesystem path to the directory containing markdown files.
ExcludePathsImmutableArray<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 defaultDocFrontMattersource rooted atContentcan setExcludePaths = ["changelog"]so a specializedChangelogFrontMattersource rooted atContent/changelogis the sole owner of that subtree. Matching is case-insensitive and segment-based:"a/b"excludesa/band anything beneath it, but nota/bcd. FilePatternstring- Glob pattern used to enumerate source files (defaults to
*.md). Formatstring- 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 sharedKeyfor standalone construction. Localestring- Locale code associated with single-locale content (ignored when multi-locale routing is active).
ReserveNotFoundPagebool- When true, a content-root-level
404.md(and its per-locale{locale}/404.mdsibling) 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. Nested404.mdfiles (e.g.guides/404.md) stay ordinary pages. Bare hosts leave this false, keeping404.mda normal route. SearchPriorityint- Relative ordering priority for this source's entries in the search index.
SectionLabelstring- 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; }
}