Hi,
In my case, I'm using Apache Sling sitemap, but it does not display the lastmod tag. Could anyone tell me what I am doing wrong so that I can fix it?
I am sharing my config screenshot for reference.
In the above config i tried both last modified and last replicated.
Here is the document I am referring to
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/overview/seo-and-ur...
Views
Replies
Total Likes
@MayurSatav Below is an example where we used in one of our project
{
"sling.servlet.resourceTypes":[
"XXXXX/components/structure/rootpage"
],
"use.vanity":false,
"include.lastmod":true,
"character.encoding":"",
"extensionless.urls":false,
"exclude.templates":"",
"changefreq.properties":[
"frequency"
],
"remove.slash":true,
"url.rewrites":[
"/content/XXXXX"
],
"include.inherit":false,
"damassets.property":"",
"damassets.types":[
""
],
"priority.properties":[
"priority"
],
"exclude.property":"includeInSitemap",
"externalizer.domain":"sitepublish"
}
If still it is not working then their could be another chance that
content may not have a last modification date: The lastmod tag is generated based on the last modification date of the content. If the content has not been modified recently, the tag may not be displayed in the sitemap
Thank @Jagadeesh_Prakash for the quick response. Seems you are using acs commons sitemap right ?. This config will not for apache sling sitemap we have separate configs for different sections for example last modified related config we have com.adobe.aem.wcm.seo.impl.sitemap.PageTreeSitemapGeneratorImpl config.
{
"lastModifiedSource": "cq:lastModified",
"enableLastModified": true
}
@MayurSatav My bad i did read your ask but did not realize that its an apache sling.Can you also try setting addLastMod=true in PageTreeSitemapGeneratorImpl configration
I already mentioned in above reply and also tried but doesn't work
@MayurSatav Did u try putting this parameter ?
addLastMod=true
I think, you need to extend it. Please check https://www.theaemmaven.com/post/aem-apache-sling-sitemap
sample changes
https://github.com/arunpatidar02/aemaacs-aemlab/pull/22/files
Hi @arunpatidar ,
Thank you for your response. I have tried the suggested approach, but it is still not working. Do I need to add an entry for this generator somewhere in the configuration? As per that blog we have to include it in scheduler config but we don't want to use scheduler.
Hi,
Tried the OOTB Apache Sling Sitemap with wknd site . For pulish instance using the value cq:lastModified is generating the lastmod tag in sitemap . Don't think extending the sitemapGenerator is required unless any site specific functionality is required , Below are the screenshots.
Thanks,
Somen
Hi @somen-sarkar ,
Thanks for the reply, You are right we don't need to extend sitemap class. Bcoz they have already given config for lastmod date inclusion as i mentioned in my reply. I tried with WKND, there it is working fine. but don't know somehow it is not working with my project. Is there any config that we need to check and update?
Hi
My sitemap is loading as below.
How to make it load properly?
Hi @chandrareddy
It is correct, you can check the view source.
I don't see XML as rendered , could be because of mimetype.
Hi Arun, Thank you. Can you pls suggest, how to enable mime type for OOTB sitemap..
Views
Likes
Replies