PenningtonOptions Pennington.Infrastructure
Main configuration options for the Pennington content engine.
Properties
AdditionalRoutingAssembliesSystem.Reflection.Assembly[]- Default:
[]Assemblies to scan for @page Razor components. CanonicalBaseUrlstring?- Default:
nullAbsolute base URL used to generate canonical, OpenGraph, and feed links. ConfigureMarkdownPipelineSystem.Action<MarkdownPipelineBuilder, System.IServiceProvider>?- Default:
nullCustomize the Markdig pipeline after Pennington's built-in extensions (including Mdazor) are added. Runs with the resolvedIServiceProviderso extensions requiring DI can be wired up. ContentRootPathstring- Default:
"Content"Root filesystem directory containing site content. HighlightingPennington.Infrastructure.HighlightingOptions- Default:
new()Code-highlighting configuration. IslandsPennington.Infrastructure.IslandsOptions- Default:
new()Island (interactive component) registration. LlmsTxtPennington.LlmsTxt.LlmsTxtOptions?- llms.txt options registered via
AddLlmsTxt, ornullwhen not enabled. LocalizationPennington.Infrastructure.LocalizationOptions- Default:
new()Localization configuration, including locales and defaults. MarkdownSourcesSystem.Collections.Generic.IReadOnlyList<Pennington.Infrastructure.MarkdownContentOptions>- Markdown content sources registered via
AddMarkdownContent. SearchIndexPennington.Search.SearchIndexOptions- Default:
new()Configuration for the search index. SiteDescriptionstring- Default:
""Default site description used for meta tags when a page supplies none. SiteTitlestring- Default:
""Site title shown in the browser tab, OpenGraph tags, and RSS feed. TabbedCodeBlockOptionsSystem.Func<Pennington.Markdown.Extensions.Tabs.TabbedCodeBlockRenderOptions>?- Default:
nullOverride the CSS class names emitted by the tabbed-code-block renderer. When set, the returnedTabbedCodeBlockRenderOptionsreplaces theDefaultshape on the pipeline's single registration of the tabbed extension. TranslationsPennington.Localization.TranslationOptions- Default:
new()Translation string configuration for localized UI.
Methods
AddLlmsTxt
#public LlmsTxtOptions AddLlmsTxt(Action<LlmsTxtOptions>? configure = null);Enable llms.txt generation for this site.
Parameters
configureAction<LlmsTxtOptions>? (optional)
Returns
LlmsTxtOptionsAddMarkdownContent<TFrontMatter>
#public MarkdownContentOptions AddMarkdownContent<TFrontMatter>(Action<MarkdownContentOptions> configure)
where TFrontMatter : FrontMatter.IFrontMatter;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
{
/// Assemblies to scan for @page Razor components.
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)
where TFrontMatter : FrontMatter.IFrontMatter;
/// 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; }
/// Root filesystem directory containing site content.
public string ContentRootPath { get; set; } = "Content";
/// Code-highlighting configuration.
public HighlightingOptions Highlighting { get; } = new();
/// Island (interactive component) registration.
public IslandsOptions Islands { get; } = new();
/// llms.txt options registered via AddLlmsTxt, or null when not enabled.
public LlmsTxtOptions? LlmsTxt => _llmsTxtOptions;
/// Localization configuration, including locales and defaults.
public LocalizationOptions Localization { get; } = new();
/// Markdown content sources registered via AddMarkdownContent.
public IReadOnlyList<MarkdownContentOptions> MarkdownSources => _markdownSources;
/// Configuration for the search index.
public SearchIndexOptions SearchIndex { get; } = new();
/// Default site description used for meta tags when a page supplies none.
public string SiteDescription { get; set; } = "";
/// Site title shown in the browser tab, OpenGraph tags, and RSS feed.
public string SiteTitle { 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; } = new();
}