Building a sitemap for your site helps Stackbit understand how to navigate between pages and also how to make pages editable.
Sitemap Navigator
The sitemap navigator gets populated either from the output of the siteMap
property or using the urlPath
property of every document from a page type model.
siteMap
Explicitly sets the list of pages listed in the sitemap navigator.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
- Type definitions are being explored and may change.
- Notice the following about the highlighted code above:
pageModels
makes use ofmodelExtensions
by automatically retrieving a set of model names whentype
is set topage
.- Documents without a
slug
are ignored because aurlPath
cannot be determined. getLocalizedFieldForLocale
is a utility that introspects an object and returns the appropriate field object. Within that object, avalue
property contains the value for the field.