Esc

Sitemap Schema

Complete field reference for streak.sitemap.json.


Full Example

[
  {
    "url": "/",
    "renderConfig": {
      "renderId": "homeRenderId",
      "metadata": {},
      "dataHandler": "HomeDataHandler",
      "rootLayout": "MainLayout",
      "widgets": [
        { "id": "PageHead",     "type": "PageHead" },
        { "id": "HelloBanner",  "type": "HelloBanner" },
        { "id": "HelloMessage", "type": "HelloMessage", "loadingStrategy": "lazy" }
      ],
      "version": "1.0.0"
    }
  }
]

Top-Level Array

The sitemap file is a JSON array. Each element is a page entry.


Page Entry Fields

FieldTypeDescription
urlstringThe URL path for this page
renderConfigobjectAll rendering configuration for this page

renderConfig Fields

FieldTypeDescription
renderIdstringUnique ID across all sitemap entries. Used as the output directory name: out/<renderId>/index.html
metadataobjectArbitrary object passed through to the renderer. Not used by Streak itself.
dataHandlerstringFilename without extension in src/handlers/
rootLayoutstringFilename without extension in src/layouts/
widgetsarrayOrdered list of widget entries for this page
versionstringOpaque version string. Ignored by the renderer.

Widget Entry Fields

FieldTypeRequiredDescription
idstringYesMust match the WidgetPlaceholder id= in the layout and the key returned by the data handler
typestringYesMust match the filename in src/widgets/ (case-sensitive, without extension)
loadingStrategy"lazy"NoWhen set, widget HTML is in the initial payload but JS assets are deferred until after page interactive

renderId Uniqueness

renderId must be globally unique across all sitemap entries. Streak uses it as the output directory name. Duplicate renderId values will cause one page to overwrite another.


File Lookups

Sitemap fieldResolved to
"dataHandler": "HomeDataHandler"src/handlers/HomeDataHandler.ts
"rootLayout": "MainLayout"src/layouts/MainLayout.tsx
"type": "HelloBanner"src/widgets/HelloBanner.tsx

All lookups are by filename without extension. Matching is case-sensitive.