We are using REACT App in the front end and using capabilities of Sitecore JSS(12.0) for headless view and SXA(1.9). I have configured settings to get sitemap settings (by inheriting sitemap template in JSS template).(https://doc.sitecore.com/developers/sxa/93/sitecore-experience-accelerator/en/configure-a-sitemap.html) I am not getting sitemap.xml with the urls. Should we write custom code?
I think you forgot to extend Page template with appropriate field (
Right now SXA (10 and lower) doesn't support officially Sitemap feature in JSS sites.
There is no feature parity between SXA and JSS. Both are technically separate types of sites which have different set of scaffolding actions.
You can compare what modules/features are available in JSS vs SXA when you compare scaffolding definitions folders
sitecore\system\Settings\Feature\JSS Experience Accelerator sitecore\system\Settings\Feature\Experience Accelerator sitecore\system\Settings\Foundation\JSS Experience Accelerator sitecore\system\Settings\Foundation\Experience Accelerator
Although it is not officially supported you can try to enable it. SXA and JSS sites share majority of the code so there is high chance that it will work.
If the only thing that you've done is Settings item template base template extension, I think your problem right now is that you are missing rest of the scaffolding actions.
I am pretty sure that this causes some of the code to not work properly
For example this base template for a Page template
Some logic relies on this field inside
BuildMultilanguageSitemap(IEnumerable<Item> childrenTree, SitemapLinkOptions options)
- Navigate to Sitemetadata module and review scaffolding actions both for SXA tenant and site.
/sitecore/system/Settings/Feature/Experience Accelerator/SiteMetadata/SiteMetadata Tenant Setup
/sitecore/system/Settings/Feature/Experience Accelerator/SiteMetadata/SiteMetadata Site Setup
- Manually do what actions would normally do (add base templates)
In case something still doesn't work you might want to create your own copy of
and debug it.