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

SiteProjection Pennington.Pipeline

Default ISiteProjection. Walks CollectIndexableEntriesAsync plus any WithLlmsTxtEntry endpoint registrations, fetches post-pipeline HTML for each route in parallel via RenderedHtmlFetcher, and folds every result into a stable index-keyed array (deterministic ordering for snapshot tests). Llms-only items have no HTTP route, so the projection renders them in-process via IContentRenderer + XrefResolvingService instead.

Registered as IFileWatchAware with Refreshed — file-watch invalidation marks just the affected routes stale (via GetAffectedRoutes) so the next access re-fetches only those, reusing the cached HTML for everything else. A Wildcard report (rename, folder-metadata edit) falls back to a full rebuild.

Constructors

SiteProjection

#
public SiteProjection(IEnumerable<IContentService> contentServices, MetadataEnrichmentService enrichment, IContentRenderer renderer, XrefResolvingService xrefResolver, RenderedHtmlFetcher fetcher, HeadingSectionExtractor extractor, SiteProjectionOptions options, EndpointDataSource endpointDataSource, ILogger<SiteProjection> logger)

Creates the projection; the corpus is materialized lazily on first access.

Parameters

contentServices IEnumerable<IContentService>
enrichment MetadataEnrichmentService
renderer IContentRenderer
xrefResolver XrefResolvingService
fetcher RenderedHtmlFetcher
extractor HeadingSectionExtractor
options SiteProjectionOptions
endpointDataSource EndpointDataSource
logger ILogger<SiteProjection>

Methods

GetPageAsync

#
public Task<RenderedPage> GetPageAsync(UrlPath canonicalPath, CancellationToken cancellationToken = default)

Returns the projected page at canonicalPath, or null when no page matches. Triggers full materialization on first call; cheap on subsequent calls.

Parameters

canonicalPath UrlPath
cancellationToken CancellationToken

Returns

Task<RenderedPage>

GetPagesAsync

#
public IAsyncEnumerable<RenderedPage> GetPagesAsync(CancellationToken cancellationToken = default)

Yields every renderable page in deterministic discovery order. Materializes lazily on first enumeration; subsequent calls replay the cached array until the instance is dropped by file-watch invalidation.

Parameters

cancellationToken CancellationToken

Returns

IAsyncEnumerable<RenderedPage>

OnFileChanged

#
public FileWatchResponse OnFileChanged(FileChangeNotification change)

Called on the file-watcher thread for every watched change. Must be quick and thread-safe.

Parameters

change FileChangeNotification

Returns

FileWatchResponse

Pennington.Pipeline.SiteProjection

namespace Pennington.Pipeline;

/// Default ISiteProjection. Walks CollectIndexableEntriesAsync plus any WithLlmsTxtEntry endpoint registrations, fetches post-pipeline HTML for each route in parallel via RenderedHtmlFetcher, and folds every result into a stable index-keyed array (deterministic ordering for snapshot tests). Llms-only items have no HTTP route, so the projection renders them in-process via IContentRenderer + XrefResolvingService instead. Registered as IFileWatchAware with Refreshed — file-watch invalidation marks just the affected routes stale (via GetAffectedRoutes) so the next access re-fetches only those, reusing the cached HTML for everything else. A Wildcard report (rename, folder-metadata edit) falls back to a full rebuild.
public class SiteProjection
{
    /// Returns the projected page at canonicalPath, or null when no page matches. Triggers full materialization on first call; cheap on subsequent calls.
    
public Task<RenderedPage> GetPageAsync(UrlPath canonicalPath, CancellationToken cancellationToken = default)
; /// Yields every renderable page in deterministic discovery order. Materializes lazily on first enumeration; subsequent calls replay the cached array until the instance is dropped by file-watch invalidation.
public IAsyncEnumerable<RenderedPage> GetPagesAsync(CancellationToken cancellationToken = default)
; /// Called on the file-watcher thread for every watched change. Must be quick and thread-safe.
public FileWatchResponse OnFileChanged(FileChangeNotification change)
; /// Creates the projection; the corpus is materialized lazily on first access.
public SiteProjection(IEnumerable<IContentService> contentServices, MetadataEnrichmentService enrichment, IContentRenderer renderer, XrefResolvingService xrefResolver, RenderedHtmlFetcher fetcher, HeadingSectionExtractor extractor, SiteProjectionOptions options, EndpointDataSource endpointDataSource, ILogger<SiteProjection> logger)
; }