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

PageResolverExtensions Pennington.Content

Convenience extensions over IPageResolver.

Methods

ResolveAsync<TFrontMatter>

#
public static Task<RenderedItem<TFrontMatter>> ResolveAsync<TFrontMatter>(IPageResolver resolver, UrlPath requested)

Resolves requested and narrows the rendered page's front matter to TFrontMatter in one step, so callers read typed properties without a cast. Returns null when nothing matches, the match fails to render, or the matched page's front matter is not a TFrontMatter.

Parameters

resolver IPageResolver
The resolver to query.
requested UrlPath
Canonical URL to resolve.

Returns

Task<RenderedItem<TFrontMatter>>

Pennington.Content.PageResolverExtensions

namespace Pennington.Content;

/// Convenience extensions over IPageResolver.
public class PageResolverExtensions
{
    /// Resolves requested and narrows the rendered page's front matter to TFrontMatter in one step, so callers read typed properties without a cast. Returns null when nothing matches, the match fails to render, or the matched page's front matter is not a TFrontMatter.
    
public static Task<RenderedItem<TFrontMatter>> ResolveAsync<TFrontMatter>(IPageResolver resolver, UrlPath requested)
; }