ContentEngineExtensions

class

Namespace: MyLittleContentEngine

Provides extension methods for configuring and using MyLittleContentEngine services within an ASP.NET Core application. These methods facilitate static site generation with Blazor, including content management and file processing.

Declaration

public static class ContentEngineExtensions

Inheritance

objectContentEngineExtensions

Methods

AddApiReferenceContentService

method
public static IServiceCollection AddApiReferenceContentService(IServiceCollection services, Func<IServiceProvider, ApiReferenceContentOptions> func)
Adds an ApiReferenceContentService to the application's service collection for generating API documentation.
Returns: IServiceCollection
services IServiceCollectionThe application's service collection.
func Func<IServiceProvider, ApiReferenceContentOptions>

AddContentEngineService

method
public static IServiceCollection AddContentEngineService(IServiceCollection services, Func<IServiceProvider, ContentEngineOptions> configureOptions)
Registers the core MyLittleContentEngine generation services for converting a Blazor application into static HTML, CSS, and JavaScript.
Returns: IServiceCollection
services IServiceCollectionThe application's service collection.
configureOptions Func<IServiceProvider, ContentEngineOptions>Optional action to customize the static generation process.

AddContentEngineStaticContentService

method
public static IServiceCollection AddContentEngineStaticContentService(IServiceCollection services, Func<IServiceProvider, ContentEngineContentOptions<TFrontMatter>>? configureOptions)
Adds a ContentFilesService to the application's service collection with custom front matter support.
Returns: IServiceCollection
services IServiceCollectionThe application's service collection.
configureOptions Func<IServiceProvider, ContentEngineContentOptions<TFrontMatter>>?Action to customize the content service options.

AddRoslynService

method
public static IServiceCollection AddRoslynService(IServiceCollection services, Func<IServiceProvider, RoslynHighlighterOptions>? configureOptions)
Adds a RoslynHighlighterService to the application's service collection with support for Roslyn highlighter configuration.
Returns: IServiceCollection
services IServiceCollectionThe application's service collection.
configureOptions Func<IServiceProvider, RoslynHighlighterOptions>?Action to configure the Roslyn highlighter options.

RunOrBuildContent

method
public static Task RunOrBuildContent(WebApplication app, string[] args)
Conditionally runs the application or generates a static build based on command-line arguments.
Returns: Task
app WebApplicationThe web application.
args string[]Command-line arguments passed to the application.