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

PenningtonOptions Pennington.Infrastructure

Main configuration options for the Pennington content engine.

Properties

AdditionalRoutingAssemblies Assembly[]
Extra assemblies to scan for routable @page Razor components. The entry assembly is always scanned, so a bare host need only set this to add components defined in other assemblies.
CanonicalBaseUrl string
Absolute base URL used to generate canonical, OpenGraph, and feed links.
ConfigureMarkdownPipeline Action<MarkdownPipelineBuilder, IServiceProvider>
Customize the Markdig pipeline after Pennington's built-in extensions (including Mdazor) are added. Runs with the resolved IServiceProvider so extensions requiring DI can be wired up.
ContentFormats IReadOnlyList<ContentFormatOptions>
Content formats registered via AddContentFormat.
ContentRootPath FilePath
Root filesystem directory containing site content.
Favicons FaviconOptions
Favicon / icon link generation. Set to emit <link rel="icon"> (and apple-touch-icon, mask-icon, manifest) tags into every page head; null disables the feature. The icon files are user-provided static assets in the content root. Templates forward their own option into this.
FrontMatter FrontMatterParserOptions
Front-matter parser configuration (strict-mode toggle).
Highlighting HighlightingOptions
Code-highlighting configuration.
LlmsTxt LlmsTxtOptions
llms.txt options registered via AddLlmsTxt, or null when not enabled.
Localization LocalizationOptions
Localization configuration, including locales and defaults.
MapSitemap bool
When true (the default), UsePennington maps the /sitemap.xml endpoint. Set to false to suppress the endpoint when the host environment supplies its own sitemap. Template extensions like AddBlogSite forward their own toggle into this flag.
MarkdownSources IReadOnlyList<MarkdownContentOptions>
Markdown content sources registered via AddMarkdownContent.
SearchIndex SearchIndexOptions
Configuration for the search index.
SiteDescription string
Default site description used for meta tags when a page supplies none.
SiteProjection SiteProjectionOptions
Configuration for the shared ISiteProjection consumed by every corpus aggregator (search index, llms.txt, build-time link audit). Set ContentSelector here when the layout wraps content in chrome that should be stripped before indexing or extracting markdown.
SiteTitle string
Site title shown in the browser tab, OpenGraph tags, and RSS feed.
SocialCards SocialCardOptions
Social-card (OpenGraph / Twitter image) generation. Set to enable per-page card discovery, the on-demand rendering endpoint, and the meta-tag wiring; null disables the feature. Templates forward their own option into this.
StandardSite StandardSiteOptions
Standard Site (AT Protocol long-form publishing) integration. Set to emit the verification well-known files and per-page site.standard.* head links; null disables the feature. Templates forward their own option into this.
StructuredDataAuthorName string
Site-level author fallback for auto-emitted JSON-LD, surfaced as FallbackAuthorName when a record's front matter describes structured data but names no author of its own. BlogSite forwards its BlogSiteOptions.AuthorName here.
TabbedCodeBlockOptions Func<TabbedCodeBlockRenderOptions>
Override the CSS class names emitted by the tabbed-code-block renderer. When set, the returned TabbedCodeBlockRenderOptions replaces the Default shape on the pipeline's single registration of the tabbed extension.
Translations TranslationOptions
Translation string configuration for localized UI.

Methods

AddContentFormat<TFrontMatter>

#
public ContentFormatOptions AddContentFormat<TFrontMatter>(string format, Action<ContentFormatOptions> configure)

Register a content source for a custom file format. The format's IContentParser and IContentRenderer are supplied via UseParser / UseRenderer and the pipeline routes to them by format. The format's files are discovered, parsed, and rendered through the same pipeline as markdown.

Parameters

format string
configure Action<ContentFormatOptions>

Returns

ContentFormatOptions

AddLlmsTxt

#
public LlmsTxtOptions AddLlmsTxt(Action<LlmsTxtOptions> configure = null)

Enable llms.txt generation for this site.

Parameters

configure Action<LlmsTxtOptions>

Returns

LlmsTxtOptions

AddMarkdownContent<TFrontMatter>

#
public MarkdownContentOptions AddMarkdownContent<TFrontMatter>(Action<MarkdownContentOptions> configure)

Register a markdown content source with a specific front matter type.

Parameters

configure Action<MarkdownContentOptions>

Returns

MarkdownContentOptions

Pennington.Infrastructure.PenningtonOptions

namespace Pennington.Infrastructure;

/// Main configuration options for the Pennington content engine.
public class PenningtonOptions
{
    /// Register a content source for a custom file format. The format's IContentParser and IContentRenderer are supplied via UseParser / UseRenderer and the pipeline routes to them by format. The format's files are discovered, parsed, and rendered through the same pipeline as markdown.
    
public ContentFormatOptions AddContentFormat<TFrontMatter>(string format, Action<ContentFormatOptions> configure)
; /// Extra assemblies to scan for routable @page Razor components. The entry assembly is always scanned, so a bare host need only set this to add components defined in other assemblies.
public Assembly[] AdditionalRoutingAssemblies { get; set; }
/// Enable llms.txt generation for this site.
public LlmsTxtOptions AddLlmsTxt(Action<LlmsTxtOptions> configure = null)
; /// Register a markdown content source with a specific front matter type.
public MarkdownContentOptions AddMarkdownContent<TFrontMatter>(Action<MarkdownContentOptions> configure)
; /// Absolute base URL used to generate canonical, OpenGraph, and feed links.
public string CanonicalBaseUrl { get; set; }
/// Customize the Markdig pipeline after Pennington's built-in extensions (including Mdazor) are added. Runs with the resolved IServiceProvider so extensions requiring DI can be wired up.
public Action<MarkdownPipelineBuilder, IServiceProvider> ConfigureMarkdownPipeline { get; set; }
/// Content formats registered via AddContentFormat.
public IReadOnlyList<ContentFormatOptions> ContentFormats { get; }
/// Root filesystem directory containing site content.
public FilePath ContentRootPath { get; set; }
/// Favicon / icon link generation. Set to emit <link rel="icon"> (and apple-touch-icon, mask-icon, manifest) tags into every page head; null disables the feature. The icon files are user-provided static assets in the content root. Templates forward their own option into this.
public FaviconOptions Favicons { get; set; }
/// Front-matter parser configuration (strict-mode toggle).
public FrontMatterParserOptions FrontMatter { get; }
/// Code-highlighting configuration.
public HighlightingOptions Highlighting { get; }
/// llms.txt options registered via AddLlmsTxt, or null when not enabled.
public LlmsTxtOptions LlmsTxt { get; }
/// Localization configuration, including locales and defaults.
public LocalizationOptions Localization { get; }
/// When true (the default), UsePennington maps the /sitemap.xml endpoint. Set to false to suppress the endpoint when the host environment supplies its own sitemap. Template extensions like AddBlogSite forward their own toggle into this flag.
public bool MapSitemap { get; set; }
/// Markdown content sources registered via AddMarkdownContent.
public IReadOnlyList<MarkdownContentOptions> MarkdownSources { get; }
/// Configuration for the search index.
public SearchIndexOptions SearchIndex { get; }
/// Default site description used for meta tags when a page supplies none.
public string SiteDescription { get; set; }
/// Configuration for the shared ISiteProjection consumed by every corpus aggregator (search index, llms.txt, build-time link audit). Set ContentSelector here when the layout wraps content in chrome that should be stripped before indexing or extracting markdown.
public SiteProjectionOptions SiteProjection { get; }
/// Site title shown in the browser tab, OpenGraph tags, and RSS feed.
public string SiteTitle { get; set; }
/// Social-card (OpenGraph / Twitter image) generation. Set to enable per-page card discovery, the on-demand rendering endpoint, and the meta-tag wiring; null disables the feature. Templates forward their own option into this.
public SocialCardOptions SocialCards { get; set; }
/// Standard Site (AT Protocol long-form publishing) integration. Set to emit the verification well-known files and per-page site.standard.* head links; null disables the feature. Templates forward their own option into this.
public StandardSiteOptions StandardSite { get; set; }
/// Site-level author fallback for auto-emitted JSON-LD, surfaced as FallbackAuthorName when a record's front matter describes structured data but names no author of its own. BlogSite forwards its BlogSiteOptions.AuthorName here.
public string StructuredDataAuthorName { get; set; }
/// Override the CSS class names emitted by the tabbed-code-block renderer. When set, the returned TabbedCodeBlockRenderOptions replaces the Default shape on the pipeline's single registration of the tabbed extension.
public Func<TabbedCodeBlockRenderOptions> TabbedCodeBlockOptions { get; set; }
/// Translation string configuration for localized UI.
public TranslationOptions Translations { get; }
}