Skip to content

Instantly share code, notes, and snippets.

View matthiaswenz's full-sized avatar
:octocat:

Matthias Wenz matthiaswenz

:octocat:
  • Germany
  • 03:33 (UTC +02:00)
View GitHub Profile
# encoding: utf-8
xml.instruct!
xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
page_count = 0
sitemap.resources.each do |page|
catch :next_page do
# Exclude images, metadata, config, ...
throw :next_page if page.url.start_with?('/images/')