Hi Community Members,
I am using AEM v6.5.16 and Core Component v2.21.2. I enabled OOTB "Generate Sitemap" option from Page Properties, sitemap.xml is generated as expected on Author.
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://localhost:4502/content/aem-demo/de/de.html</loc>
<lastmod>2023-02-02</lastmod>
</url>
<url>
<loc>http://localhost:4502/content/aem-demo/de/de/getting-support.html</loc>
<lastmod>2022-11-09</lastmod>
</url>
</urlset>
But In dispatcher, at sitemap.xml; content path is not resolved with /etc/map instead of I am getting Publish URL defined at CQ Link Externalizer. Expected result below:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://aem-demo.com/de/de.html</loc>
<lastmod>2023-02-02</lastmod>
</url>
<url>
<loc>https://aem-demo.com/de/de/getting-support.html</loc>
<lastmod>2022-11-09</lastmod>
</url>
</urlset>
Any suggestion how I can achieve the expected result?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
I guess you have followed the steps documented here
https://aemsimplifiedbynikhil.wordpress.com/2021/12/01/apache-sling-sitemap-for-aem-6-5-11-and-aemaa...
In case you need to override the default/some part of default implementation please checkout this documentation
https://www.tothenew.com/blog/exploring-apache-sling-sitemap-generator-with-customization-in-aem/
In our project we have map + dispatcher config for sitemap.
It seems your rules defined under /etc/map is not taking effect.
you can verify by using JCR ResourceResolver option of the Felix console; for example, https://<*host*>:<*port*>/system/console/jcrresolver
Hi @Nishant-Singh, Map is working fine when browsing Content Pages.
Hi,
I guess you have followed the steps documented here
https://aemsimplifiedbynikhil.wordpress.com/2021/12/01/apache-sling-sitemap-for-aem-6-5-11-and-aemaa...
In case you need to override the default/some part of default implementation please checkout this documentation
https://www.tothenew.com/blog/exploring-apache-sling-sitemap-generator-with-customization-in-aem/
In our project we have map + dispatcher config for sitemap.
Thanks @kaikubad. Looks like, need to override addResource implementation. Got more details from Building an XML sitemap on AEM and Extending the Apache Sling Sitemap Generator.
Views
Likes
Replies