Sha256: 8d5478d54ee5544530d75702071790a0bc73c15097303e3f43b4dd4c330706bf

Contents?: true

Size: 1.32 KB

Versions: 1

Compression:

Stored size: 1.32 KB

Contents

= Sitemap

A simple ruby on rails sitemap generator.

== Instalation

Install the gem:

  gem install sitemap

Or as a plugin:

  rails plugin install git://github.com/viseztrance/rails-sitemap.git

Then create the initial config file:

  rails g sitemap:install

== Usage

In your sitemap config file, paths can be indexed as follows:

  Sitemap::Generator.instance.load :host => "mywebsite.com" do
    path :root, :priority => 1
    path :faq, :priority => 0.5, :change_frequency => "weekly"
    resources :activities, :params => { :format => "html" }
    resources :articles, :objects => proc { Article.published }
  end

Please read the docs for a more comprehensive list of options.

Building the sitemap:

  rake sitemap:generate

Ping search engines:

  rake sitemap:ping

== Setting defaults

You may change the defaults for either <tt>params</tt> or <tt>search</tt> options as follows:

  Sitemap.defaults[:params] = { :format => "html" }

== Large sites

Google imposes a limit of 50000 entries per sitemap and maximum size of 10 MB. To comply with these rules,
sitemaps having over 10.000 urls are being split into multiple files. You can change this value by overriding the max urls value:

  Sitemap.defaults[:max_urls] = 50000

== License

This package is licensed under the MIT license and/or the Creative
Commons Attribution-ShareAlike.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sitemap-0.2 README.rdoc