Sha256: 8749dbf252586989971e3b6e291ae029a4070ef7cb31f93a40970a5bd4627f3e
Contents?: true
Size: 740 Bytes
Versions: 26
Compression:
Stored size: 740 Bytes
Contents
class ComfortableMexicanSofa::Sitemap # we want our callback to include the cms_site and # the view so we have whatever routes are available to us # xml is an xml_builder which expects a sitemap url definition, e.g: # xml.url do # xml.loc view.url_for("http://example.org/example") # xml.lastmod 2.days.ago.strftime('%Y-%m-%d') # end def self.process(cms_site, view, xml) self.sitemap_extensions.each do |extension| extension.call(cms_site, view, xml) end end def self.register_extension(callback) self.sitemap_extensions.push(callback) end private # A list of registered sitemap extension methods def self.sitemap_extensions @@sitemap_extensions ||= [] end end
Version data entries
26 entries across 26 versions & 1 rubygems