Available: google sitemap for rails project


#1

Hi,

Google Sitemaps (https://www.google.com/webmasters/sitemaps/) is a way
to help Google’s crawler on your website.

I’ve published a little script to generate, from a rails project, a
urllist file usable with the Google sitemap generator.

You drop the script in your RAILS_ROOT/lib directory, edit it to set
the base url, and you’re set. Run it with

ruby script/runner “require ‘gen_url_list’”

Download and more info in a blog post at
http://www.myowndb.com/blog/?p=12

Capabilities:

The script can work with controllers in subdirectories and can set the
last modification date of the url based on the last modification date
of the controller file.

Limitations;

It doesn’t use the Rails Routes as I didn’t find how to use the
url_for method in the script ( it’s a controller instance method).

Hoping this can be helpful for someone.

cheers

Raph