DocSiteOptions Pennington.DocSite
Options record passed to AddDocSite that configures the DocSite template: site chrome, typography, color scheme, content areas, and escape-hatch callbacks for the underlying PenningtonOptions and MonorailCssOptions.
Properties
AdditionalHtmlHeadContentstring?- Default:
nullAdditional raw HTML appended to the document<head>(for analytics, meta tags, etc.). AdditionalRoutingAssembliesSystem.Reflection.Assembly[]- Default:
[]Additional assemblies scanned for Razor components so out-of-project pages participate in routing. AreasSystem.Collections.Generic.IReadOnlyList<Pennington.DocSite.ContentArea>- Default:
[]Content areas for the documentation site. When empty or containing a single area, no area selector is shown. Each area's slug must match a top-level directory name under ContentRootPath. BodyFontFamilystring?- Default:
nullCSS font-family stack used for body copy. CanonicalBaseUrlstring?- Default:
nullAbsolute base URL used when emitting canonical links, sitemap entries, and absolute feed URLs. ColorSchemePennington.MonorailCss.IColorScheme?- Default:
nullColor scheme driving the MonorailCSS theme. Defaults to the built-in DocSite palette when null. ConfigureLocalizationSystem.Action<Pennington.Infrastructure.LocalizationOptions>?- Default:
nullConfigure localization options (locales, default locale). ConfigurePenningtonSystem.Action<Pennington.Infrastructure.PenningtonOptions>?- Default:
nullEscape hatch for additional content wiring: callback invoked against the underlyingPenningtonOptionsafter DocSite's own defaults are applied. Use to register extraAddMarkdownContentsources, add highlighters, register islands, etc., without dropping to bareAddPennington. ContentRootPathPennington.Routing.FilePath- Default:
new("Content")Root folder (relative to the content project) that holds the markdown and razor content tree. CustomCssFrameworkSettingsSystem.Func<MonorailCss.CssFrameworkSettings, MonorailCss.CssFrameworkSettings>?- Default:
nullCallback to further customize the MonorailCSS framework settings after the DocSite theme has been applied. MirrorsCustomCssFrameworkSettings. Descriptionstring- requiredShort description used in the meta description tag and default OpenGraph description.
DisplayFontFamilystring?- Default:
nullCSS font-family stack used for display type (headings and hero copy). ExtraStylesstring?- Default:
nullAdditional CSS appended to the generated stylesheet. FontPreloadsPennington.Infrastructure.FontPreload[]- Default:
[]Fonts to preload via<link rel="preload">for faster first paint. FooterContentstring?- Default:
nullMarkdown or HTML inserted into the site footer. GitHubUrlstring?- Default:
nullURL to the project's GitHub repository. When set, a GitHub link is shown in the header. HeaderContentstring?- Default:
nullMarkdown or HTML inserted into the site header alongside the icon and title. HeaderIconstring?- Default:
nullOptional image URL rendered as the header logo/icon. LlmsTxtContentSelectorstring?- Default:
nullOverride the CSS selector used to scope HTML-to-markdown extraction for the LLM-channel HTTP-fetch fallback (used for Razor pages and other non-markdown content that don't have a markdown source to render). Markdown content uses the rendition channel directly and ignores this. Default is#main-content; override when the layout has been replaced. Set to an empty string to extract the full body. SearchIndexContentSelectorstring?- Default:
nullOverride the CSS selector used to scope the search index to a page region. Default is#main-content— the element wrapping the article in the stock DocSite layout. Set to an empty string to index the whole page body, or to a custom selector when you've replaced the layout. SiteTitlestring- requiredTitle displayed in the site chrome and used as a default for OpenGraph tags.
SocialImageUrlstring?- Default:
nullDefault social-share image URL used when a page does not specify its own. SyntaxThemePennington.MonorailCss.SyntaxTheme?- Default:
nullSyntax-highlight color palette used by.hljs-*token classes. Defaults toDefaultwhen null. Values may reference custom palette names registered viaColorScheme.
Pennington.DocSite.DocSiteOptions
namespace Pennington.DocSite;
/// Options record passed to AddDocSite that configures the DocSite template: site chrome, typography, color scheme, content areas, and escape-hatch callbacks for the underlying PenningtonOptions and MonorailCssOptions.
public record DocSiteOptions
{
/// Additional raw HTML appended to the document <head> (for analytics, meta tags, etc.).
public string? AdditionalHtmlHeadContent { get; init; }
/// Additional assemblies scanned for Razor components so out-of-project pages participate in routing.
public Assembly[] AdditionalRoutingAssemblies { get; init; } = [];
/// Content areas for the documentation site. When empty or containing a single area, no area selector is shown. Each area's slug must match a top-level directory name under ContentRootPath.
public IReadOnlyList<ContentArea> Areas { get; init; } = [];
/// CSS font-family stack used for body copy.
public string? BodyFontFamily { get; init; }
/// Absolute base URL used when emitting canonical links, sitemap entries, and absolute feed URLs.
public string? CanonicalBaseUrl { get; init; }
/// Color scheme driving the MonorailCSS theme. Defaults to the built-in DocSite palette when null.
public IColorScheme? ColorScheme { get; init; }
/// Configure localization options (locales, default locale).
public Action<LocalizationOptions>? ConfigureLocalization { get; init; }
/// Escape hatch for additional content wiring: callback invoked against the underlying PenningtonOptions after DocSite's own defaults are applied. Use to register extra AddMarkdownContent sources, add highlighters, register islands, etc., without dropping to bare AddPennington.
public Action<PenningtonOptions>? ConfigurePennington { get; init; }
/// Root folder (relative to the content project) that holds the markdown and razor content tree.
public FilePath ContentRootPath { get; init; } = new("Content");
/// Callback to further customize the MonorailCSS framework settings after the DocSite theme has been applied. Mirrors CustomCssFrameworkSettings.
public Func<global::MonorailCss.CssFrameworkSettings, global::MonorailCss.CssFrameworkSettings>? CustomCssFrameworkSettings { get; init; }
/// Short description used in the meta description tag and default OpenGraph description.
public required string Description { get; init; }
/// CSS font-family stack used for display type (headings and hero copy).
public string? DisplayFontFamily { get; init; }
/// Additional CSS appended to the generated stylesheet.
public string? ExtraStyles { get; init; }
/// Fonts to preload via <link rel="preload"> for faster first paint.
public FontPreload[] FontPreloads { get; init; } = [];
/// Markdown or HTML inserted into the site footer.
public string? FooterContent { get; init; }
/// URL to the project's GitHub repository. When set, a GitHub link is shown in the header.
public string? GitHubUrl { get; init; }
/// Markdown or HTML inserted into the site header alongside the icon and title.
public string? HeaderContent { get; init; }
/// Optional image URL rendered as the header logo/icon.
public string? HeaderIcon { get; init; }
/// Override the CSS selector used to scope HTML-to-markdown extraction for the LLM-channel HTTP-fetch fallback (used for Razor pages and other non-markdown content that don't have a markdown source to render). Markdown content uses the rendition channel directly and ignores this. Default is #main-content; override when the layout has been replaced. Set to an empty string to extract the full body.
public string? LlmsTxtContentSelector { get; init; }
/// Override the CSS selector used to scope the search index to a page region. Default is #main-content — the element wrapping the article in the stock DocSite layout. Set to an empty string to index the whole page body, or to a custom selector when you've replaced the layout.
public string? SearchIndexContentSelector { get; init; }
/// Title displayed in the site chrome and used as a default for OpenGraph tags.
public required string SiteTitle { get; init; }
/// Default social-share image URL used when a page does not specify its own.
public string? SocialImageUrl { get; init; }
/// Syntax-highlight color palette used by .hljs-* token classes. Defaults to Default when null. Values may reference custom palette names registered via ColorScheme.
public SyntaxTheme? SyntaxTheme { get; init; }
}