Search...
routerSitemap( )
Returns the sitemap for a router or dynamic page prefix.
Description
The routerSitemap()
function returns a Promise that resolves to a list of
WixSitemapEntry
objects. Each
WixSitemapEntry
includes
information about a page, such as its URL, title, and name.
A sitemap is used by search engines to find the links to the site's pages.
Authorization
Request
This endpoint does not take any parameters
Response Object
Fulfilled - A list of sitemap entries. Rejected - The error that caused the rejection.
Returns an empty object.
Status/Error Codes
Was this helpful?
Get the sitemap for a prefix
Copy Code
1import wixSiteFrontend from 'wix-site-frontend';23// ...45wixSiteFrontend.routerSitemap("routerPrefix")6 .then( (routerSitemap) => {7 const sitemap = routerSitemap;8 } );910/*11 * sitemap:12 *13 * [14 * {15 * "url": "Ash",16 * "lastModified": null,17 * "changeFrequency": "",18 * "priority": null,19 * "title": "Ash Stowe",20 * "pageName": "Ash's Page"21 * },22 * {23 * "url": "Aiden",24 * "lastModified": null,25 * "changeFrequency": "",26 * "priority": null,27 * "title": "Aiden Johnson",28 * "pageName": "Aiden's page"29 * },30 * {31 * "url": "Jess",32 * "lastModified": null,33 * "changeFrequency": "",34 * "priority": null,35 * "title": "Jess White",36 * "pageName": "Jess's page"37 * },38 * {39 * "url": "Morgan",40 * "lastModified": null,41 * "changeFrequency": "",42 * "priority": null,43 * "title": "Morgan James",44 * "pageName": "Morgan's Page"45 * }46 * ]47 */