One of the things that I would like to tackle before the end of the year is including sitemap.xml files with all of the new sites that my team develops. We could generate these files manually, but this would be tedious at best. There are a number of tools that will generate these files for you. Some of them are stand-alone desktop applications (Sitemap XML). Some web-based tools are built in PHP (AutoSitemap), Perl (TM Google Sitemap Generator), Python (Google WebMaster Tools), etc., and you can use in your own local environments. There is even a web site that you can submit your URL and it will generate the sitemap.xml file for you (XML Sitemaps).
My requirements for this feature are pretty simple:
- Something built in C#
- Something we can include in our projects
- Something that can be run as part of our build process
- Something that can be completely hands-free
- [Is] instantly useable with the majority of ASP.NET applications
- [Is] a full ‘binary’ solution – no integration of code or compiling – just drop in a binary, modify the web.config and go
- [Is] extendable so that more complicated ASP.NET applications could redefine the provider without restriction
It seems like this is a great fit for our architecture. The solution was to have a single assembly with three main types:
- An HTTP Handler which would return the XML on request (called GoogleSiteMapHandler)
- A Provider Type (called GoogleSiteMapProvider)
- A Controller class to glue the Handler and Provider together
This is a great place for us to start. The source code is available, it seems to fit my needs, and is simple to use.
Anyone else using something different? Do you have any other ideas? Have you found any other tools that might be useful for this? Leave a comment and let me know.