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

ContentPipeline Pennington.Pipeline

Orchestrates the content processing pipeline.

Constructors

ContentPipeline

#
public ContentPipeline(IEnumerable<IContentService> services, IContentRenderer renderer, IContentParser parser = null, TimeProvider clock = null)

Creates the pipeline from the registered content services and renderer. The parser is optional: a bare host that registers no markdown source has no IContentParser, so discovered items pass through the parse stage unchanged.

Parameters

services IEnumerable<IContentService>
renderer IContentRenderer
parser IContentParser
clock TimeProvider

Methods

DiscoverAsync

#
public IAsyncEnumerable<ContentItem> DiscoverAsync()

Entry: content services produce discovered items.

Returns

IAsyncEnumerable<ContentItem>

GenerateAsync

#
public Task<BuildReport> GenerateAsync(IAsyncEnumerable<ContentItem> items)

Exit: generate output files.

Parameters

items IAsyncEnumerable<ContentItem>

Returns

Task<BuildReport>

ParseAsync

#
public IAsyncEnumerable<ContentItem> ParseAsync(IAsyncEnumerable<ContentItem> items)

Transform: parse items (read files, extract YAML + body).

Parameters

items IAsyncEnumerable<ContentItem>

Returns

IAsyncEnumerable<ContentItem>

RenderAsync

#
public IAsyncEnumerable<ContentItem> RenderAsync(IAsyncEnumerable<ContentItem> items)

Transform: render items (Markdig pipeline to HTML).

Parameters

items IAsyncEnumerable<ContentItem>

Returns

IAsyncEnumerable<ContentItem>

RunAsync

#
public Task<BuildReport> RunAsync()

Convenience: run the full pipeline end-to-end.

Returns

Task<BuildReport>

Pennington.Pipeline.ContentPipeline

namespace Pennington.Pipeline;

/// Orchestrates the content processing pipeline.
public class ContentPipeline
{
    /// Creates the pipeline from the registered content services and renderer. The parser is optional: a bare host that registers no markdown source has no IContentParser, so discovered items pass through the parse stage unchanged.
    
public ContentPipeline(IEnumerable<IContentService> services, IContentRenderer renderer, IContentParser parser = null, TimeProvider clock = null)
; /// Entry: content services produce discovered items.
public IAsyncEnumerable<ContentItem> DiscoverAsync()
; /// Exit: generate output files.
public Task<BuildReport> GenerateAsync(IAsyncEnumerable<ContentItem> items)
; /// Transform: parse items (read files, extract YAML + body).
public IAsyncEnumerable<ContentItem> ParseAsync(IAsyncEnumerable<ContentItem> items)
; /// Transform: render items (Markdig pipeline to HTML).
public IAsyncEnumerable<ContentItem> RenderAsync(IAsyncEnumerable<ContentItem> items)
; /// Convenience: run the full pipeline end-to-end.
public Task<BuildReport> RunAsync()
; }