Sha256: d30e16316ae9ab5602508fbd06a7a88f502af23ee4aa01fd6bee6b4469ef9864
Contents?: true
Size: 732 Bytes
Versions: 35
Compression:
Stored size: 732 Bytes
Contents
xml.instruct! xml.urlset "xmlns" => "http://www.google.com/schemas/sitemap/0.9", "xmlns:xhtml" => "http://www.w3.org/1999/xhtml" do @pages.each do |page| xml.url do xml.loc "#{request.protocol}#{request.host}#{page.materialized_path}" # Translations page.translations.each do |translation| if translation.locale.in? Spina.config.locales.map(&:to_s) Mobility.with_locale(translation.locale) do xml.xhtml(:link, rel: "alternate", hreflang: translation.locale, href: "#{request.protocol}#{request.host}#{page.materialized_path}") end end end xml.lastmod page.updated_at.to_date xml.changefreq "weekly" xml.priority 0.9 end end end
Version data entries
35 entries across 35 versions & 1 rubygems