ContentPipeline Pennington.Pipeline
Orchestrates the content processing pipeline.
Constructors
.ctor
#public ContentPipeline(
IEnumerable<IContentService> services,
IContentParser parser,
IContentRenderer renderer);Creates the pipeline from the registered content services, parser, and renderer.
Parameters
servicesIEnumerable<IContentService>parserIContentParserrendererIContentRenderer
Methods
DiscoverAsync
#public async IAsyncEnumerable<ContentItem> DiscoverAsync();Entry: content services produce discovered items.
Returns
IAsyncEnumerable<ContentItem>GenerateAsync
#public async Task<BuildReport> GenerateAsync(IAsyncEnumerable<ContentItem> items, OutputOptions options);Exit: generate output files.
Parameters
itemsIAsyncEnumerable<ContentItem>optionsOutputOptions
Returns
Task<BuildReport>ParseAsync
#public async IAsyncEnumerable<ContentItem> ParseAsync(IAsyncEnumerable<ContentItem> items);Transform: parse items (read files, extract YAML + body).
Parameters
itemsIAsyncEnumerable<ContentItem>
Returns
IAsyncEnumerable<ContentItem>RenderAsync
#public async IAsyncEnumerable<ContentItem> RenderAsync(IAsyncEnumerable<ContentItem> items);Transform: render items (Markdig pipeline to HTML).
Parameters
itemsIAsyncEnumerable<ContentItem>
Returns
IAsyncEnumerable<ContentItem>RunAsync
#public async Task<BuildReport> RunAsync(OutputOptions options);Convenience: run the full pipeline end-to-end.
Parameters
optionsOutputOptions
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, parser, and renderer.
public ContentPipeline(
IEnumerable<IContentService> services,
IContentParser parser,
IContentRenderer renderer);
/// Entry: content services produce discovered items.
public async IAsyncEnumerable<ContentItem> DiscoverAsync();
/// Exit: generate output files.
public async Task<BuildReport> GenerateAsync(IAsyncEnumerable<ContentItem> items, OutputOptions options);
/// Transform: parse items (read files, extract YAML + body).
public async IAsyncEnumerable<ContentItem> ParseAsync(IAsyncEnumerable<ContentItem> items);
/// Transform: render items (Markdig pipeline to HTML).
public async IAsyncEnumerable<ContentItem> RenderAsync(IAsyncEnumerable<ContentItem> items);
/// Convenience: run the full pipeline end-to-end.
public async Task<BuildReport> RunAsync(OutputOptions options);
}