1

I am using Sitecore 10 and Angular JSS without SXA, I did not install it, so my question is how I can generate an XML sitemap to our site?

2

2 Answers 2

0

You can generate an XML sitemap by inheriting the sitemap SXA templates on the JSS settings template.

Please inherit the base template named _SitemapSettings from below mentioned path to the JSS setting template

/sitecore/templates/Feature/Experience Accelerator/SiteMetadata/Sitemap/_SitemapSettings

And another template named _Sitemap from below mentioned path to the corresponding route template you have created.

/sitecore/templates/Feature/Experience Accelerator/SiteMetadata/Sitemap/_Sitemap

You can also check out the detailed blog about this on the below link. (For transparency, this is my personal blog post).

https://www.linkedin.com/pulse/steps-enable-sxa-sitemapxml-robotstxt-feature-sitecore-nijas-hameed/

0

To generate the sitemap, you will still need to go through the Sitecore Pipelines. The pipeline responsible for the sitemap would be httpRequestBegin.

Even if you are not using SXA, you may try to see how the sitemap has been implemented. Moreover, there are many online resources on how to implement sitemap on Sitecore, examples:

If you want to see how the sitemap is implemented in SXA, you can check the following namespace

Sitecore.XA.Feature.SiteMetadata.Pipelines.HttpRequestBegin.SitemapHandler, Sitecore.XA.Feature.SiteMetadata
1
  • I'm not sure this really classifies as an answer for the OP question. The user is using a headless approach and therefore generating a sitemap via the CD server will likely not suffice here, since they'll need the sitemap generated on their rendering host(s). Feb 8, 2022 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.