No commit activity in last 3 years
No release in over 3 years
Rake tasks to manage sitemap.xml generation for static sites
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 1.0
>= 0.8.7
 Project Readme

Generate Sitemap Rake Task

This is a small rake task that will crawl a static site locally in the specific directory and generate a sitemap.xml file with a list of links, optionally compressing it.

Installation

gem install static_sitemap_tasks

Configuration/Usage

To use, require the gem in your Rakefile and install the task with configuration

require 'static_sitemap_tasks'

SitemapGenerator::Tasks.install(
  :base_url => 'http://www.mysite.com', # Required
  :change_frequency => 'daily', # Optional, see http://www.sitemaps.org/protocol.php#changefreqdef
  :date_mode => 'git' # Optional, one of 'git' or 'mtime'. default: nil (disabled)
  :gzip_output => true, # Optional, default: true
  :index_files => [ 'index.html' ], # Optional, default: [ 'index.html', 'index.htm' ]
  :public_root => 'public' # Optional, default: Dir.pwd
)

To execute, rake generate_sitemap

More Info

http://www.sitemaps.org/protocol.php

Credits

Originally Authored by Chris Marting (http://chriscodes.com/articles/view/54) Updates by Tom Cocca Rewrite for static sites by Michael Leinartas ping_search_engines() lifted from http://github.com/adamsalter/sitemap_generator by Adam Salter