Sha256: 8f142ebc3070adc71af606c0e71388aad873966e12178fab42d1a33d919a687d

Contents?: true

Size: 690 Bytes

Versions: 5

Compression:

Stored size: 690 Bytes

Contents

xml.instruct!
xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do

  xml.url do
    xml.loc site_url
    xml.priority 1.0
  end

  @pages.each do |page|
    unless page.index?
      if page.templatable?
        page.fetch_items.each do |c|
          if c.slug.present?
            xml.url do
              xml.loc public_page_url(c)
              xml.lastmod c.updated_at.to_date.to_s('%Y-%m-%d')
              xml.priority 0.9
            end
          end
        end
      else
        xml.url do
          xml.loc public_page_url(page)
          xml.lastmod page.updated_at.to_date.to_s('%Y-%m-%d')
          xml.priority 0.9
        end
      end
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kms_seo-1.0.2 app/views/kms/public/sitemaps/show.xml.builder
kms_seo-1.0.1 app/views/kms/public/sitemaps/show.xml.builder
kms_seo-1.0.0 app/views/kms/public/sitemaps/show.xml.builder
kms_seo-0.2.0 app/views/kms/public/sitemaps/show.xml.builder
kms_seo-0.1.0 app/views/kms/public/sitemaps/show.xml.builder