HandledRoute interface represents a route that Scully will render to static HTML. It contains all the metadata, configuration, and data needed to render a page.
Interface Definition
Core Properties
route
The complete, final route path that will be rendered.This is the path where the static HTML file will be saved (e.g.,
dist/static/blog/my-first-post/index.html).usedConfigRoute
The route pattern from Useful for understanding which route configuration created this route.
scully.config.ts that generated this route.type
The router plugin that discovered or generated this route.Common types:
'contentFolder', 'json', 'default'Configuration
config
Route-specific configuration options.
RouteConfig Interface
Data Properties
data
Additional metadata that will be included in This data is accessible in your Angular app via
scully.routes.json.ScullyRoutesService.RouteData Interface
title
Optional page title. If
data.title exists, it takes precedence.Angular Integration
exposeToPage
Variables that will be available to Angular during rendering via Access in Angular:
window object.injectToPage
Data that will be injected into the static HTML page.
Rendering Control
renderPlugin
Specify a custom render plugin for this route instead of the default.
postRenderers
Array of post-render plugins to execute after initial rendering.
Content Routes
templateFile
Path to the content file (for content-based routes).
ContentTextRoute
An extended interface for content-based routes:Example
Advanced Properties
rawRoute
The complete URL that Puppeteer should visit, including protocol and parameters.If not specified, Scully constructs the URL automatically using the
route property.Creating HandledRoutes
In Router Plugins
In Route Process Plugins
Accessing Routes in Angular
Scully generates ascully.routes.json file containing all HandledRoute objects:
Type Safety
Use TypeScript for type-safe route handling:Source Reference
Source:libs/scully/src/lib/routerPlugins/handledRoute.interface.ts:19
Related
Route Discovery
How Scully discovers routes
Router Plugins
Create plugins that generate routes
Route Config
Configure routes in scully.config.ts
ScullyRoutesService
Access routes in Angular

