PenningtonOptions
Pennington.Infrastructure
Main configuration options for the Pennington content engine.
Properties
AdditionalRoutingAssembliesAssembly[]- Extra assemblies to scan for routable
@pageRazor components. The entry assembly is always scanned, so a bare host need only set this to add components defined in other assemblies. CanonicalBaseUrlstring- Absolute base URL used to generate canonical, OpenGraph, and feed links.
ConfigureMarkdownPipelineAction<MarkdownPipelineBuilder, IServiceProvider>- Customize the Markdig pipeline after Pennington's built-in extensions (including Mdazor) are added. Runs with the resolved
IServiceProviderso extensions requiring DI can be wired up. ContentFormatsIReadOnlyList<ContentFormatOptions>- Content formats registered via
AddContentFormat. ContentRootPathFilePath- Root filesystem directory containing site content.
FaviconsFaviconOptions- 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. FrontMatterFrontMatterParserOptions- Front-matter parser configuration (strict-mode toggle).
HighlightingHighlightingOptions- Code-highlighting configuration.
LlmsTxtLlmsTxtOptions- llms.txt options registered via
AddLlmsTxt, ornullwhen not enabled. LocalizationLocalizationOptions- Localization configuration, including locales and defaults.
MapSitemapbool- When true (the default),
UsePenningtonmaps the/sitemap.xmlendpoint. Set to false to suppress the endpoint when the host environment supplies its own sitemap. Template extensions likeAddBlogSiteforward their own toggle into this flag. MarkdownSourcesIReadOnlyList<MarkdownContentOptions>- Markdown content sources registered via
AddMarkdownContent. SearchIndexSearchIndexOptions- Configuration for the search index.
SiteDescriptionstring- Default site description used for meta tags when a page supplies none.
SiteProjectionSiteProjectionOptions- Configuration for the shared
ISiteProjectionconsumed by every corpus aggregator (search index, llms.txt, build-time link audit). SetContentSelectorhere when the layout wraps content in chrome that should be stripped before indexing or extracting markdown. SiteTitlestring- Site title shown in the browser tab, OpenGraph tags, and RSS feed.
SocialCardsSocialCardOptions- 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.
StandardSiteStandardSiteOptions- 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. StructuredDataAuthorNamestring- Site-level author fallback for auto-emitted JSON-LD, surfaced as
FallbackAuthorNamewhen a record's front matter describes structured data but names no author of its own. BlogSite forwards itsBlogSiteOptions.AuthorNamehere. TabbedCodeBlockOptionsFunc<TabbedCodeBlockRenderOptions>- Override the CSS class names emitted by the tabbed-code-block renderer. When set, the returned
TabbedCodeBlockRenderOptionsreplaces theDefaultshape on the pipeline's single registration of the tabbed extension. TranslationsTranslationOptions- 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
formatstringconfigureAction<ContentFormatOptions>
Returns
ContentFormatOptionsAddLlmsTxt
#public LlmsTxtOptions AddLlmsTxt(Action<LlmsTxtOptions> configure = null)
Enable llms.txt generation for this site.
Parameters
configureAction<LlmsTxtOptions>
Returns
LlmsTxtOptionsAddMarkdownContent<TFrontMatter>
#public MarkdownContentOptions AddMarkdownContent<TFrontMatter>(Action<MarkdownContentOptions> configure)
Register a markdown content source with a specific front matter type.
Parameters
configureAction<MarkdownContentOptions>
Returns
MarkdownContentOptionsPennington.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; }
}