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
| Field | Type | Description |
|---|---|---|
url | string | The URL path for this page |
renderConfig | object | All rendering configuration for this page |
renderConfig Fields
| Field | Type | Description |
|---|---|---|
renderId | string | Unique ID across all sitemap entries. Written into the page's build output as an identifier. |
metadata | object | Passed as the first argument to the data handler ((metadata, { common }) => {...}) and to the layout component. |
dataHandler | string | Filename without extension in src/handlers/ |
rootLayout | string | Filename without extension in src/layouts/ |
widgets | array | Ordered list of widget entries for this page |
version | string | Used as part of the build output path: out/<url>/<version>/raw-content.json |
Widget Entry Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Any string identifying this widget slot. Must match the WidgetPlaceholder id= in the layout and the key returned by the data handler. Must be unique within this entry's widgets[]. Not required to equal type. |
type | string | Yes | The widget name. Must match the filename in src/widgets/ (case-sensitive, without extension). May be shared by multiple entries on the same page. |
loadingStrategy | "lazy" | No | When set, only a lightweight skeleton placeholder ships in the initial payload — the widget's real HTML and scripts are fetched and swapped in after page load |
id vs type
id and type are independent fields:
type— the widget component to render. Resolves tosrc/widgets/<type>.tsx. Multiple entries on a page can share onetype.id— the instance key. Selects the handler data slice (props.data = handlerReturn[id]) and the layout slot (WidgetPlaceholder id=). Must be unique among the entry'swidgets[].
They hold the same string in most examples purely for readability. To place the same widget in two spots on one page, give two entries the same type and different ids:
"widgets": [
{ "id": "featuredProducts", "type": "ProductList" },
{ "id": "newArrivals", "type": "ProductList" }
] <Script> ids are deduplicated per page: a reused widget type must produce a distinct <Script id> per instance, or only the first instance's client script ships.
renderId Uniqueness
renderId must be globally unique across all sitemap entries — it's written into each page's build output and used to identify the page. Duplicate renderId values can cause ambiguity between pages.
File Lookups
| Sitemap field | Resolved 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.