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

ContentItem Pennington.Pipeline

Union of all content item states flowing through the pipeline.

Cases

DiscoveredItem DiscoveredItem
A content item discovered by a content service but not yet run through the pipeline.
FailedItem FailedItem
A content item that failed during parsing or rendering.
ParsedItem ParsedItem
A content item whose front matter and raw markdown body have been parsed.
RenderedItem RenderedItem
A content item whose body has been rendered to HTML.

Properties

Route ContentRoute
The route for the current item regardless of state.
Value object
Wrapped case instance; inspect via pattern matching on the case types.

Constructors

ContentItem

#
public ContentItem(DiscoveredItem value)

Wraps a DiscoveredItem.

Parameters

value DiscoveredItem

ContentItem

#
public ContentItem(ParsedItem value)

Wraps a ParsedItem.

Parameters

value ParsedItem

ContentItem

#
public ContentItem(RenderedItem value)

Wraps a RenderedItem.

Parameters

value RenderedItem

ContentItem

#
public ContentItem(FailedItem value)

Wraps a FailedItem.

Parameters

value FailedItem

Pennington.Pipeline.ContentItem

namespace Pennington.Pipeline;

/// Union of all content item states flowing through the pipeline.
public struct ContentItem
{
    /// Wraps a DiscoveredItem.
    
public ContentItem(DiscoveredItem value)
; /// Wraps a ParsedItem.
public ContentItem(ParsedItem value)
; /// Wraps a RenderedItem.
public ContentItem(RenderedItem value)
; /// Wraps a FailedItem.
public ContentItem(FailedItem value)
; /// A content item discovered by a content service but not yet run through the pipeline.
public record DiscoveredItem(ContentRoute Route, ContentSource Source) : object, IEquatable<DiscoveredItem>
/// A content item that failed during parsing or rendering.
public record FailedItem(ContentRoute Route, ContentError Error) : object, IEquatable<FailedItem>
/// A content item whose front matter and raw markdown body have been parsed.
public record ParsedItem(ContentRoute Route, IFrontMatter Metadata, string RawMarkdown) : object, IEquatable<ParsedItem>
/// A content item whose body has been rendered to HTML.
public record RenderedItem(ContentRoute Route, IFrontMatter Metadata, RenderedContent Content) : object, IEquatable<RenderedItem>
/// The route for the current item regardless of state.
public ContentRoute Route { get; }
/// Wrapped case instance; inspect via pattern matching on the case types.
public object Value { get; }
}