This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

DocSiteServiceExtensions Pennington.DocSite

DI extension methods for registering and running the DocSite template.

Methods

AddDocSite

#
public static IServiceCollection AddDocSite(IServiceCollection services, Func<DocSiteOptions> configureOptions)

Registers DocSite services with the provided options.

Parameters

services IServiceCollection
configureOptions Func<DocSiteOptions>

Returns

IServiceCollection

RunDocSiteAsync

#
public static Task RunDocSiteAsync(WebApplication app, string[] args)

Runs the DocSite: either serves the app or performs a static build, based on command-line args.

Parameters

app WebApplication
args string[]

Returns

Task

UseDocSite

#
public static WebApplication UseDocSite(WebApplication app)

Wires DocSite middleware and Razor components into the request pipeline.

Parameters

app WebApplication

Returns

WebApplication

Pennington.DocSite.DocSiteServiceExtensions

namespace Pennington.DocSite;

/// DI extension methods for registering and running the DocSite template.
public class DocSiteServiceExtensions
{
    /// Registers DocSite services with the provided options.
    
public static IServiceCollection AddDocSite(IServiceCollection services, Func<DocSiteOptions> configureOptions)
; /// Runs the DocSite: either serves the app or performs a static build, based on command-line args.
public static Task RunDocSiteAsync(WebApplication app, string[] args)
; /// Wires DocSite middleware and Razor components into the request pipeline.
public static WebApplication UseDocSite(WebApplication app)
; }