Web/ForgeTrust.Runnable.Web.RazorWire.Cli/ExportEngine.cs
ExportEngine
Type
ExportEngine
A static generation engine that crawls a RazorWire application and exports its routes to static HTML files.
Method
RunAsync(ExportContext, CancellationToken)
Crawls the site starting from configured seed routes (or the root) and exports discovered pages and frame sources to the output path.
If is provided, the file is read and each line is validated and normalized to a root-relative route; invalid seeds are logged. If the seed file exists but yields no valid routes, the root path ("/") is enqueued. If no seed file is provided, the root path is enqueued. Discovered internal links and frame sources are queued and processed until the queue is exhausted or the operation is cancelled.
Method
ExportRouteAsync(HttpClient, string, ExportContext, CancellationToken)
Fetches the HTML or asset for the specified route from the base URL, writes the file to the output directory, and enqueues any discovered internal links for further export.
Method
MapRouteToFilePath(string, string, bool)
Maps a root-relative route to an absolute file path inside the configured output directory.
Method
ExtractLinks(string, ExportContext)
Extracts root-relative internal link targets from the provided HTML and enqueues any unvisited routes for crawling.
Method
ExtractFrames(string, ExportContext)
Extracts root-relative `src` values from <turbo-frame> elements in the provided HTML and enqueues each unvisited path for export.
Method
ExtractAssets(string, string, ExportContext)
Extracts root-relative asset references (scripts, styles, images) from the provided HTML and enqueues each unvisited path for export.
Method
ResolveRelativeUrl(string, string)
Resolves a potentially relative URL against a base route.