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
servicesIEnumerable<IContentService>rendererIContentRendererparserIContentParserclockTimeProvider
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
itemsIAsyncEnumerable<ContentItem>
Returns
Task<BuildReport>ParseAsync
#public IAsyncEnumerable<ContentItem> ParseAsync(IAsyncEnumerable<ContentItem> items)
Transform: parse items (read files, extract YAML + body).
Parameters
itemsIAsyncEnumerable<ContentItem>
Returns
IAsyncEnumerable<ContentItem>RenderAsync
#public IAsyncEnumerable<ContentItem> RenderAsync(IAsyncEnumerable<ContentItem> items)
Transform: render items (Markdig pipeline to HTML).
Parameters
itemsIAsyncEnumerable<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()
;
}