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

SocialCardEndpointExtensions Pennington.SocialCards

Endpoint helper that renders social-card images on demand.

Methods

MapSocialCards

#
public static IEndpointRouteBuilder MapSocialCards(IEndpointRouteBuilder routes)

Maps {BaseUrl}/{**slug}.png to the host's Render hook. Serves cards live during development and is the route the static build crawler fetches to bake each card discovered by SocialCardContentService. Resolving page metadata from ContentRecordRegistry (a discovery-time join, not the request-path-forbidden ISiteProjection) keeps this safe to consume from a live request.

Parameters

routes IEndpointRouteBuilder

Returns

IEndpointRouteBuilder

Pennington.SocialCards.SocialCardEndpointExtensions

namespace Pennington.SocialCards;

/// Endpoint helper that renders social-card images on demand.
public class SocialCardEndpointExtensions
{
    /// Maps {BaseUrl}/{**slug}.png to the host's Render hook. Serves cards live during development and is the route the static build crawler fetches to bake each card discovered by SocialCardContentService. Resolving page metadata from ContentRecordRegistry (a discovery-time join, not the request-path-forbidden ISiteProjection) keeps this safe to consume from a live request.
    
public static IEndpointRouteBuilder MapSocialCards(IEndpointRouteBuilder routes)
; }