Sha256: c9b806d25a88890fc438fce254cd2ca1fa53f8ca100bf2e36730c4f243da1d1b

Contents?: true

Size: 388 Bytes

Versions: 49

Compression:

Stored size: 388 Bytes

Contents

xml.instruct! :xml, :version => '1.0', :encoding => 'UTF-8'

# create the urlset
xml.urlset :xmlns => 'http://www.sitemaps.org/schemas/sitemap/0.9' do
  @posts.each do |post|
    xml.url do
      if post.is_news
        xml.loc news_post_url(post.url_name)
      else
        xml.loc blog_post_url(post.url_name)
      end 
      xml.lastmod post.published_at.xmlschema
    end
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
spud_blog-0.9.4 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.9.3 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.9.2 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.9.1 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.9.0 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.18 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.17 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.16 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.15 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.14 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.13 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.12 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.11 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.8 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.7 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.6 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.5 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.4 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.3 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.2 app/views/spud/blog/sitemaps/show.xml.builder