A full-page render request: validates the route, then calls
Engine.renderPage.
Remarks
A page render returns a complete HTML Document for the first load.
The route maps to a template under pages/ (see pageTemplate):
/ is pages/home.html; /article and /article/ are pages/article.html.
If that template is not loaded, pages/index.html is used as the
catch-all when it exists.
Otherwise, or when the route is not a valid name (.., \, NUL), the
render rejects with NOT_FOUND (Page not found). The route is never
echoed into the error or the HTML.
The page is bound with params. If layout/shell.html exists it is
bound with the same params plus content set to the page HTML (the
engine's content wins over a content param). Otherwise the page goes
into a minimal default <!DOCTYPE html> document whose
<body> holds a <dock-main> with an open shadow root.
Routes only resolve under pages/: a route can never render a fragment or
the layout. There is no route-parameter matching (/article/my-slug looks
for pages/article/my-slug.html).
Templates can use open Declarative Shadow DOM
(<template shadowrootmode="open">) so shadow roots and scoped styles exist
before any script runs; the engine does not add them to your templates
(except in the default document).
A full-page render request: validates the route, then calls Engine.renderPage.
Remarks
A page render returns a complete HTML Document for the first load. The route maps to a template under
pages/(see pageTemplate):/ispages/home.html;/articleand/article/arepages/article.html.pages/index.htmlis used as the catch-all when it exists...,\, NUL), the render rejects withNOT_FOUND(Page not found). The route is never echoed into the error or the HTML.params. Iflayout/shell.htmlexists it is bound with the same params pluscontentset to the page HTML (the engine'scontentwins over acontentparam). Otherwise the page goes into a minimal default<!DOCTYPE html>document whose<body>holds a<dock-main>with an open shadow root.Routes only resolve under
pages/: a route can never render a fragment or the layout. There is no route-parameter matching (/article/my-sluglooks forpages/article/my-slug.html).Templates can use open Declarative Shadow DOM (
<template shadowrootmode="open">) so shadow roots and scoped styles exist before any script runs; the engine does not add them to your templates (except in the default document).Example