All topics / About Everything

Templates and rendering

Separate what a page says from how its stored definition presents it.

A page's JSON source holds content such as title, summary and Markdown body. A template defines how selected fields become HTML. The page's template association is a tag, so presentation can change without rewriting historical content bytes.

All pages in this initial guide use one shared guide-v1 template. It supplies a responsive reading column, breadcrumbs, section navigation, a related-search sidebar and curated Guide links. The title bar is supplied by the trusted application. Curated links are content fields; search-generated cards come from the template's bounded lexical search.

Read How pages become websites to understand how a page is selected and rendered. Templates are a declarative description of a layout, and a missing or invalid template falls back to a safe generic view.

Templates are stored in the same corpus as pages and media. They are not uploaded executable programs, and a template's active tag is not permission for an anonymous reader to download its raw source.

In this section

Successful template selection and its validated definition are cached without a timeout for a warm instance. Template edits can remain stale until eviction/restart. Rendering stays dynamic, and there is no static HTML publishing step.

The shared guide template also renders the selected page’s tags using $page.tags. The trusted context is separate from source JSON, and includes canonical path, logical ID, page type, template ID and revision key. Templates decide where to show it; no extra metadata read is needed.

View page as JSON