Sha256: 9b1c815d38e0a00fef2b7c8972f549b1ae025de5914c2ba8088da9591296b469

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

xml.instruct!
xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9", "xmlns:video" => "http://www.google.com/schemas/sitemap-video/1.1" do
  xml.url do
    xml.loc root_url
    xml.priority("0.5")
  end
  @people.each do |person|
    xml.url do
      xml.loc person_url(person)
      xml.changefreq("monthly")
      xml.priority("0.7")
      if person.updated_at.blank?
        xml.lastmod(person.created_at.strftime("%Y-%m-%d"))
      else
        xml.lastmod(person.updated_at.strftime("%Y-%m-%d"))
      end
    end
  end
  @clips.each do |clip|
    xml.url do
      xml.loc clip_url(clip)
      xml.priority("1.0")
      if clip.updated_at.blank?
        xml.lastmod(clip.created_at.strftime("%Y-%m-%d"))
      else
        xml.lastmod(clip.updated_at.strftime("%Y-%m-%d"))
      end
      xml.video :video do |video|
        xml.video :thumbnail_loc, clip.png
        xml.video :title, clip.title
        xml.video :description, clip.description
        xml.video :content_loc, clip.mp4
        xml.video :duration, clip.duration
        xml.video :publication_date, clip.created_at.to_date
        xml.video :category, "Oral History"
        xml.video :gallery_loc, person_url(clip.people.first)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kinney-0.0.1 app/views/kinney/sitemap/index.xml.builder