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

RazorContentRenderer Pennington.Pipeline

Base IContentRenderer that renders a Razor component TComponent to HTML. A subclass projects a ParsedItem into the component's parameters via BuildParameters; this base owns the Blazor HtmlRenderer dispatch, heading-anchor assignment, and outline extraction. A structured content format therefore renders through Razor markup the way markdown renders through Markdig — both produce a RenderedContent. The host must register Razor component services (AddRazorComponents()).

Methods

RenderAsync

#
public Task<ContentItem> RenderAsync(ParsedItem item)

Render a parsed item. Returns RenderedItem on success, FailedItem on failure.

Parameters

item ParsedItem

Returns

Task<ContentItem>

Pennington.Pipeline.RazorContentRenderer

namespace Pennington.Pipeline;

/// Base IContentRenderer that renders a Razor component TComponent to HTML. A subclass projects a ParsedItem into the component's parameters via BuildParameters; this base owns the Blazor HtmlRenderer dispatch, heading-anchor assignment, and outline extraction. A structured content format therefore renders through Razor markup the way markdown renders through Markdig — both produce a RenderedContent. The host must register Razor component services (AddRazorComponents()).
public class RazorContentRenderer
{
    /// Render a parsed item. Returns RenderedItem on success, FailedItem on failure.
    
public Task<ContentItem> RenderAsync(ParsedItem item)
; }