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- Additional raw HTML appended to the document
<head>(for analytics, meta tags, etc.). AdditionalRoutingAssembliesAssembly[]- Additional assemblies scanned for Razor components so out-of-project pages participate in routing.
AreasIReadOnlyList<ContentArea>- 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- CSS font-family stack used for body copy.
CanonicalBaseUrlstring- Absolute base URL used when emitting canonical links, sitemap entries, and absolute feed URLs.
ColorSchemeIColorScheme- Color scheme driving the MonorailCSS theme. Defaults to the built-in DocSite palette when null.
ConfigureLocalizationAction<LocalizationOptions>- Configure localization options (locales, default locale).
ConfigurePenningtonAction<PenningtonOptions>- Escape hatch for additional content wiring: callback invoked against the underlying
PenningtonOptionsafter DocSite's own defaults are applied. Use to register extraAddMarkdownContentsources, add highlighters, register islands, etc., without dropping to bareAddPennington. ContentRootPathFilePath- Root folder (relative to the content project) that holds the markdown and razor content tree.
ContentSelectorstring- Override the CSS selector used to scope the shared site projection to a page region. The same selector drives the search index, llms.txt sidecars, and build-time link audit, so chrome (navigation, footers) is stripped once. Default is
#main-content— the element wrapping the article in the stock DocSite layout. Set to an empty string to project the whole page body, or to a custom selector when you've replaced the layout. CustomCssFrameworkSettingsFunc<CssFrameworkSettings, CssFrameworkSettings>- Callback to further customize the MonorailCSS framework settings after the DocSite theme has been applied. Mirrors
CustomCssFrameworkSettings. DisplayFontFamilystring- CSS font-family stack used for display type (headings and hero copy).
ExtendProseCustomizationFunc<ProseCustomization, ProseCustomization>- Wraps the baseline
ProseCustomization. Forwarded toExtendProseCustomization. ExtraStylesstring- Additional CSS appended to the generated stylesheet.
FaviconsFaviconOptions- Favicon / icon links. Forwarded to
Favicons. FontPreloadsFontPreload[]- Fonts to preload via
<link rel="preload">for faster first paint. FooterContentMarkupContent?- Content rendered in the site footer. Assign a raw HTML string or a
RenderFragment— both convert implicitly. Strings are emitted as raw HTML, not markdown. GitHubUrlstring- URL to the project's GitHub repository. When set, a GitHub link is shown in the header.
HeaderContentMarkupContent?- The header brand area (logo + title). Assign a raw HTML string or a
RenderFragment— both convert implicitly. When set, it replaces the default icon andSiteTitlelink outright, giving total control over that region; when null, the default document icon and title link render. Strings are emitted as raw HTML, not markdown. MonoFontFamilystring- CSS font-family stack used for monospaced contexts (code blocks, inline code, kbd).
SiteDescriptionstring- requiredShort description used in the meta description tag and default OpenGraph description.
SiteTitlestring- requiredTitle displayed in the site chrome and used as a default for OpenGraph tags.
SocialCardsSocialCardOptions- Enables generated per-page social cards. When set, each page emits an
og:image/twitter:imagepointing at an on-demand-rendered card (and the site-wideSocialImageUrldefault steps aside). The host supplies the drawing viaRender. SocialImageUrlstring- Default social-share image URL used when a page does not specify its own.
StandardSiteStandardSiteOptions- Standard Site (AT Protocol) integration. Forwarded to
StandardSite. StylesDictionary<string, string>- Per-slot CSS class overrides keyed by
StyleKeysconstants. Each value is Tailwind-merged over the template's default for that slot — conflicting utilities are replaced, non-conflicting ones kept (dark:variants only conflict with otherdark:classes, so override them explicitly). Unknown keys throw at startup. Write values as compile-time string literals — MonorailCSS class discovery scans IL string literals and cannot see runtime-built strings. SyntaxThemeSyntaxTheme- Syntax-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; set; }
/// Additional assemblies scanned for Razor components so out-of-project pages participate in routing.
public Assembly[] AdditionalRoutingAssemblies { get; set; }
/// 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; set; }
/// CSS font-family stack used for body copy.
public string BodyFontFamily { get; set; }
/// Absolute base URL used when emitting canonical links, sitemap entries, and absolute feed URLs.
public string CanonicalBaseUrl { get; set; }
/// Color scheme driving the MonorailCSS theme. Defaults to the built-in DocSite palette when null.
public IColorScheme ColorScheme { get; set; }
/// Configure localization options (locales, default locale).
public Action<LocalizationOptions> ConfigureLocalization { get; set; }
/// 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; set; }
/// Root folder (relative to the content project) that holds the markdown and razor content tree.
public FilePath ContentRootPath { get; set; }
/// Override the CSS selector used to scope the shared site projection to a page region. The same selector drives the search index, llms.txt sidecars, and build-time link audit, so chrome (navigation, footers) is stripped once. Default is #main-content — the element wrapping the article in the stock DocSite layout. Set to an empty string to project the whole page body, or to a custom selector when you've replaced the layout.
public string ContentSelector { get; set; }
/// Callback to further customize the MonorailCSS framework settings after the DocSite theme has been applied. Mirrors CustomCssFrameworkSettings.
public Func<CssFrameworkSettings, CssFrameworkSettings> CustomCssFrameworkSettings { get; set; }
/// CSS font-family stack used for display type (headings and hero copy).
public string DisplayFontFamily { get; set; }
/// Wraps the baseline ProseCustomization. Forwarded to ExtendProseCustomization.
public Func<ProseCustomization, ProseCustomization> ExtendProseCustomization { get; set; }
/// Additional CSS appended to the generated stylesheet.
public string ExtraStyles { get; set; }
/// Favicon / icon links. Forwarded to Favicons.
public FaviconOptions Favicons { get; set; }
/// Fonts to preload via <link rel="preload"> for faster first paint.
public FontPreload[] FontPreloads { get; set; }
/// Content rendered in the site footer. Assign a raw HTML string or a RenderFragment — both convert implicitly. Strings are emitted as raw HTML, not markdown.
public MarkupContent? FooterContent { get; set; }
/// URL to the project's GitHub repository. When set, a GitHub link is shown in the header.
public string GitHubUrl { get; set; }
/// The header brand area (logo + title). Assign a raw HTML string or a RenderFragment — both convert implicitly. When set, it replaces the default icon and SiteTitle link outright, giving total control over that region; when null, the default document icon and title link render. Strings are emitted as raw HTML, not markdown.
public MarkupContent? HeaderContent { get; set; }
/// CSS font-family stack used for monospaced contexts (code blocks, inline code, kbd).
public string MonoFontFamily { get; set; }
/// Short description used in the meta description tag and default OpenGraph description.
public string SiteDescription { get; set; }
/// Title displayed in the site chrome and used as a default for OpenGraph tags.
public string SiteTitle { get; set; }
/// Enables generated per-page social cards. When set, each page emits an og:image/ twitter:image pointing at an on-demand-rendered card (and the site-wide SocialImageUrl default steps aside). The host supplies the drawing via Render.
public SocialCardOptions SocialCards { get; set; }
/// Default social-share image URL used when a page does not specify its own.
public string SocialImageUrl { get; set; }
/// Standard Site (AT Protocol) integration. Forwarded to StandardSite.
public StandardSiteOptions StandardSite { get; set; }
/// Per-slot CSS class overrides keyed by StyleKeys constants. Each value is Tailwind-merged over the template's default for that slot — conflicting utilities are replaced, non-conflicting ones kept (dark: variants only conflict with other dark: classes, so override them explicitly). Unknown keys throw at startup. Write values as compile-time string literals — MonorailCSS class discovery scans IL string literals and cannot see runtime-built strings.
public Dictionary<string, string> Styles { get; set; }
/// 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; set; }
}