Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f5ddca5a40
Fetching contributors…

Cannot retrieve contributors at this time

45 lines (27 sloc) 1.637 kb

Sitemaps Module for BrowserCMS

This is a simple module that generates a basic xml Sitemap for BrowserCMS projects. For each published page, it generates the loc tag according to the Sitemap protocol, but no metadata.

To determine which pages should be included in the Sitemap, it leverages BrowserCMS' menu_items helper. This means that hidden or unpublished pages will not be included. Empty sections are also ignored.

The xml document is exposed at /sitemaps/google.xml


The Seo Sitemap module installs like most other BrowserCMS modules. You'll also need to install the Settings module which Seo Sitemap uses to write configuration values. Setting up both modules at once is easy though:

rails generate cms:install bcms_settings
rails generate cms:install bcms_seo_settings
rake db:migrate

At this point, the sitemap module will be installed and usable. The setting module will automatically be configured to use it.


The module adds a new entry under Administration > Tools labeled "Google Sitemap" where the module can be configured.

At the moment, only the "depth" option is available, which is passed to the menu_items helper method. Setting a depth of 2 will result in a call to menu_items like this:

menu_items(:depth => 2, :show_all_siblings => true, :page => Page.find_by_path('/')

The module's configuration (currently just one value) is written to a global key value store provided by the Settings module.

A depth value of 0 (the default) will include all published pages.

Jump to Line
Something went wrong with that request. Please try again.