This site provides a machine-readable index at /llms.txt.

Skip to main content Skip to navigation

PenningtonOptions Pennington.Infrastructure

Main configuration options for the Pennington content engine.

Properties

AdditionalRoutingAssemblies System.Reflection.Assembly[]
Default: []
Assemblies to scan for @page Razor components.
CanonicalBaseUrl string?
Default: null
Absolute base URL used to generate canonical, OpenGraph, and feed links.
ConfigureMarkdownPipeline System.Action<MarkdownPipelineBuilder, System.IServiceProvider>?
Default: null
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.
ContentRootPath string
Default: "Content"
Root filesystem directory containing site content.
Highlighting Pennington.Infrastructure.HighlightingOptions
Default: new()
Code-highlighting configuration.
Islands Pennington.Infrastructure.IslandsOptions
Default: new()
Island (interactive component) registration.
LlmsTxt Pennington.LlmsTxt.LlmsTxtOptions?
llms.txt options registered via AddLlmsTxt, or null when not enabled.
Localization Pennington.Infrastructure.LocalizationOptions
Default: new()
Localization configuration, including locales and defaults.
MarkdownSources System.Collections.Generic.IReadOnlyList<Pennington.Infrastructure.MarkdownContentOptions>
Markdown content sources registered via AddMarkdownContent.
SearchIndex Pennington.Search.SearchIndexOptions
Default: new()
Configuration for the search index.
SiteDescription string
Default: ""
Default site description used for meta tags when a page supplies none.
SiteTitle string
Default: ""
Site title shown in the browser tab, OpenGraph tags, and RSS feed.
TabbedCodeBlockOptions System.Func<Pennington.Markdown.Extensions.Tabs.TabbedCodeBlockRenderOptions>?
Default: null
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 Pennington.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

configure Action<LlmsTxtOptions>? (optional)

Returns

LlmsTxtOptions

AddMarkdownContent<TFrontMatter>

#
public MarkdownContentOptions AddMarkdownContent<TFrontMatter>(Action<MarkdownContentOptions> configure)
    where TFrontMatter : FrontMatter.IFrontMatter;

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
{
    /// 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();
}