Created
January 20, 2016 13:31
-
-
Save sathishmanohar/27fe3fd64474980687d8 to your computer and use it in GitHub Desktop.
Middleman sitemap.xml generator developed from https://gist.github.com/lukebowerman/3287848
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
sitemap_noindex: true | |
sitemap_priority: 0.8 | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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