blacklight-sitemap
Rake task for creating a sitemap from a Blacklight Solr index.
Installation
-
This version only works with Rails 3.2/Blacklight 4. Some changes to how Blacklight is configured and how it communicates with Solr mean that it will currently only work with Blacklight 4 using the standard CatalogController.
-
In Gemfile gem 'blacklight-sitemap', '~> 2.0.0'
-
Install the gem:
bundle install -
Run the generator:
rails g blacklight:sitemap -
Open your Rakefile and edit the BlacklightSitemapTask to your liking using the provided documentation.
-
Run the rake task:
rake blacklight:sitemap -
Remove created sitemap files:
rake blacklight:sitemap:clobber
Upgrading
- Either remove your current blacklight-sitemap from your Rakefile or comment it out.
- Install the latest gem. You may need to update the version in your cofig/environment.rb
- Run the generator again.
TODO
- Determine the lastmodified date for a particular sub-sitemap. For large indexes, allowing search engines to only download the sitemaps which have changed will be important. Can we always sort by timestamp?
- How to more fully test the gem independent from a Rails application with Blacklight installed?
- Instead of having to hardcode the base url find an easy way to include Blacklight route url helpers in the rake task.
- Incremental sitemaps?
- Check file size to insure a sitemap doesn't go above the 10MB limit.
- Insure the sitemap index file does not exceed 50,000 sitemaps and 10MB.
Author
Jason Ronallo
Copyright
Copyright (c) 2010 North Carolina State University. See LICENSE.txt for further details.