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.8.1 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.8.0 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.7.5 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.7.4 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.7.2 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.7.0 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.6.3 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.6.0 app/views/spud/blog/sitemaps/show.xml.builder
spud_blog-0.5.1 app/views/spud/blog/sitemaps/show.xml.builder