Generate Sitemap plugin

Plugin details

This is a Rails plugin that consists of a rake task generate a sitemap.xml. The task crawls a domain (default is localhost:3000) for all it's url's, then builds the sitemap.xml file in public.

Websitehttp://chriscodes.com/articles/view/54 Repositorysvn://chriscodes.homelinux.org/rails_plugins/generate_sitemap generate_sitemap Author Chris Tags sitemap, generator LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install svn://chriscodes.homelinux.org/rails_plugins/generate_sitemap generate_sitemap

Open tasks/generate_sitemap.rake and set the DOMAIN constant to your domain (DOMAIN is set to localhost:3000 by default, and will use that in the sitemap urls)

You can optionally set the changefreq element, or add the other available elements in the building of the xml. (http://www.sitemaps.org/protocol.php). I haven't devised a way to set this dynamically, as most pages will vary.

Run the task with the command

rake plugin:generate_sitemap



Go to http://localhost:3000/sitemap.xml (or open public/sitemap.xml)

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 7 months ago