Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Middleman sitemap.xml generator developed from https://gist.github.com/lukebowerman/3287848
---
sitemap_noindex: true
sitemap_priority: 0.8
---
---
directory_index: false
---
<% pages = sitemap.resources.find_all{|p| p.source_file.match(/\.html/) && !p.data.sitemap_noindex == true } %>
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<% pages.each do |p| %>
<url>
<loc>http://balcozy.com<%=p.url.gsub('/index.html','')%></loc>
<changefreq>monthly</changefreq>
<priority><%= p.data.sitemap_priority || 0.5 %></priority>
</url>
<% end %>
</urlset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.