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

BlogSiteServiceExtensions Pennington.BlogSite

DI extension methods for registering and running the BlogSite template.

Methods

AddBlogSite

#
public static IServiceCollection AddBlogSite(IServiceCollection services, Func<BlogSiteOptions> configureOptions)

Registers BlogSite services with the provided options.

Parameters

services IServiceCollection
configureOptions Func<BlogSiteOptions>

Returns

IServiceCollection

RunBlogSiteAsync

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

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

Parameters

app WebApplication
args string[]

Returns

Task

UseBlogSite

#
public static WebApplication UseBlogSite(WebApplication app)

Wires BlogSite middleware, Razor components, and RSS endpoint into the request pipeline.

Parameters

app WebApplication

Returns

WebApplication

Pennington.BlogSite.BlogSiteServiceExtensions

namespace Pennington.BlogSite;

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