An XML sitemap is a file that lists a website’s important pages, making sure Google and other search engines can find and crawl them all. It also helps search engines understand your website structure. Though search engines crawls all pages and links in the page, seldom sites end up with few pages that are not linked from any other pages (like the promo landing pages). Having those pages entered in sitemap.xml, speeds up the content discovery and get indexed.
This blog narrates the implementation of sitemap.xml using ACS AEM Commons package. ACS AEM Commons package is open source package, originally built and supported by Adobe Consulting Services, later turned into an open source/AEM community maintained package.
You can get more details on this and other features provided by package here
Lets walk through the steps in implementing the sitemap.xml using this package.
- Create a OSGI Configuration for sitemap servlet.
- create a file com.adobe.acs.commons.wcm.impl.SiteMapServlet-custom.cfg.json under ui.config/config. This setting will be common for all run modes.
- Edit file with necessary parameters
- sling.servlet.resourceTypes - This should have path to the page component in your project
- externalizer.doain - this should have the domain name or the site name
- Create a OSGI Configuration for Externalizer Implementation
- create a file com.day.cq.commons.impl.ExternalizerImpl.cfg.json.
- This file should be created for each run mode (dev, qa, stage, prod) as the value will change for each environment
- Entries have various site/domains and its relative URL - local, author and publish are updated by default by AEM.
- add the new site and its url
No comments:
Post a Comment