We would like to share a new module for creating xml sitemap files we have recently been working on for EPiServer websites. Whilst there are already available a number of sitemap add-ons for EPiServer, we kept finding they didn't completely satisfy all of our requirements. What we really wanted was a solution which:
- Enables website administrators to manage the sitemap files to be created.
- Can be used in a simple, single website to complex multisite/enterprise configurations.
- Enables the languages to be selected for inclusion in a particular sitemap file.
- Has an interface which administrators can use to control the configuration.
- Can be run as a scheduled job.
Running as a scheduled job was an important requirement for us, as we wanted to resolve concerns around long running jobs and have sitemap files remain available when a job fails. We originally used Henrick's XML sitemap module for this and are still using some of the code in this module.
- Sitemap files are created by host in the EPiServer installation.
- Sitemap files are physically generated and held on disk.
- A sitemap index file can be generated when more than one sitemap is created.
- Process runs as a scheduled job.
- Administration interface to configure the languages and file names for each sitemap.
- The configuration adheres to the host and culture settings in EPiServer, that means; hosts with a default culture set will automatically have that language included in their sitemap. When a language is set on a particular host, it will not be usable on sitemaps for other hosts.
- Extensible - a mechanism for enabling developers to implement their own custom filters has been added. More on that in another post.
The module is installed via the EPiServer deployment centre. The source and module download can be found on at http://episitemap.codeplex.com/
Here are some examples of configuration ranging from a simple single site to a complex enterprise sites.
It would be much appreciated to get any feedback on this module. We've had a lot of fun creating this and resolved many issues along the way around running processes without a http context. This might be useful for other similar projects. Feel free to leave a comment or contact me @adamjenkin