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

ReadingTimeEnricher Pennington.Pipeline

Estimates reading time from the markdown body and contributes it as reading_time_minutes. A pure function of RawMarkdown — no file access, no external dependencies.

Fields

Key string
Default: "reading_time_minutes"
Key written into Derived.

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.ReadingTimeEnricher

namespace Pennington.Pipeline;

/// Estimates reading time from the markdown body and contributes it as reading_time_minutes. A pure function of RawMarkdown — no file access, no external dependencies.
public class ReadingTimeEnricher
{
    /// 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)
; /// Key written into Derived.
public static const string Key
; }