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
contentServicesIEnumerable<IContentService>enrichmentMetadataEnrichmentServicerendererIContentRendererxrefResolverXrefResolvingServicefetcherRenderedHtmlFetcherextractorHeadingSectionExtractoroptionsSiteProjectionOptionsendpointDataSourceEndpointDataSourceloggerILogger<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
canonicalPathUrlPathcancellationTokenCancellationToken
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
cancellationTokenCancellationToken
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
changeFileChangeNotification
Returns
FileWatchResponsePennington.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)
;
}