A rails sitemap plugin

Hi, guys:

I wrote a sitemap plugin for rails yesterday. This plugin will generate the public/sitemap.xml from config/sitemap.rb whose format is very familiar to config/routes.rb. I think it is very helpful if you have a website written by rails and want it to be crawled by spiders such as google, yahoo and baidu.

The home page of the plugin is GitHub - flyerhzm/sitemap: This plugin will generate a sitemap.xml from sitemap.rb whose format is very similar to routes.rb

The following codes is the config/sitemap.rb using in my website

Sitemap::Routes.host = 'http://www.huangzhimin.com'

Sitemap::Routes.draw do |map|   map.resources :projects   map.resources :entries   map.resources :posts   map.resources :categories, :except => ['index', 'show'] do | category>     category.resources :posts, :except => 'show'   end   map.resources :tags, :except => ['index', 'show'] do |tag|     tag.resources :entries, :except => 'show'   end   map.root :controller => 'pasters', :action => 'index' end

You can see the generated sitemap.xml in http://www.huangzhimin.com/sitemap.xml, and this sitemap.xml is successfully submitted to google.

Hope it is useful to you!

Thanks, Richard