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 at the same URL with .md appended. 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

IMetadataEnricher Pennington.Pipeline

Contributes derived (non-authored) metadata for a parsed content item — reading time, git last-modified, GitHub permalinks, and the like. Contributions are merged into Derived by MetadataEnrichmentService. Register implementations with AddTransient<IMetadataEnricher, T>().

Methods

EnrichAsync

#
public Task<IReadOnlyDictionary<string, object>> EnrichAsync(ParsedItem item)

Returns key/value pairs to merge into the item's derived metadata. Return an empty dictionary to contribute nothing. Later-registered enrichers override earlier ones on key collision.

Parameters

item ParsedItem

Returns

Task<IReadOnlyDictionary<string, object>>

Pennington.Pipeline.IMetadataEnricher

namespace Pennington.Pipeline;

/// Contributes derived (non-authored) metadata for a parsed content item — reading time, git last-modified, GitHub permalinks, and the like. Contributions are merged into Derived by MetadataEnrichmentService. Register implementations with AddTransient<IMetadataEnricher, T>().
public interface IMetadataEnricher
{
    /// Returns key/value pairs to merge into the item's derived metadata. Return an empty dictionary to contribute nothing. Later-registered enrichers override earlier ones on key collision.
    
public Task<IReadOnlyDictionary<string, object>> EnrichAsync(ParsedItem item)
; }