This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Jun 22 12:37:58 -0700 2008 | |
| |
MIT-LICENSE | Sun Jun 22 12:37:58 -0700 2008 | |
| |
README | Sun Jun 22 12:37:58 -0700 2008 | |
| |
Rakefile | Sun Jun 22 12:37:58 -0700 2008 | |
| |
init.rb | Sun Jun 22 12:37:58 -0700 2008 | |
| |
install.rb | Sun Jun 22 12:37:58 -0700 2008 | |
| |
lib/ | Sun Jun 22 12:37:58 -0700 2008 | |
| |
tasks/ | Sun Jun 22 12:37:58 -0700 2008 | |
| |
test/ | Sun Jun 22 12:37:58 -0700 2008 | |
| |
uninstall.rb | Sun Jun 22 12:37:58 -0700 2008 |
README
=HasSitemap
This plugin allow your sites provide in an easy way sitemap and/or sitemaps index to
improve search engine indexing.
For more details about the sitemap protocol see [1]
=Example
For sitemap :
controller MyController::ActiveController::Base
has_sitemap :data => :my_func
def index
end
# Others public methods
private
def my_func
# Create sitemap array
end
end
The my_func function must return an array of hashes, where each hash contains the keys :
loc, lastmod, priority (optional), changefreq (optional). The changefreq must be a valid value
as described in [1].
The plugin add an aditional method to help in the array construction, called sitemap_entry.
See the docs for more details.
For sitemap_index :
controller MyController::ActiveController::Base
has_sitemap_index :data => :my_func
def index
end
# Others public methods
private
def my_func
# Create sitemap array
end
end
The value returned by my_func is the same as described for has_sitemap, with loc and loatmod (optional)
has keys for each item.
To access to your sitemap or sitemap_index just use :
http://localhost:3000/my/sitemap.xml
http://localhost:3000/my/sitemap_index.xml
=TODO
* A Sitemap can't have more than 50k entries, the plugnin have handle this for large sites
* GZipped sitemaps
=References
[1] http://www.sitemaps.org/protocol.php
Copyright (c) 2008 Ricardo Markiewcz <richard@3dgames.com.ar>, released under the MIT license







