Forum: Ruby on Rails available: google sitemap for rails project

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
71c85a662af0764df3a77cc00db166c9?d=identicon&s=25 Raphael Bauduin (Guest)
on 2006-04-28 14:45
(Received via mailing list)
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
This topic is locked and can not be replied to.