Created
September 19, 2013 20:08
-
-
Save johntday/6629132 to your computer and use it in GitHub Desktop.
Jekyll template for generating simple `sitemap.xml` for Google indexing.
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
--- | |
layout: nil | |
title : "My Sitemap" | |
sitemap_exclude: y | |
--- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
{% for post in site.posts %} | |
<url> | |
<loc>{{site.production_url}}{{ post.url | remove: 'index.html' }}</loc> | |
</url> | |
{% endfor %} | |
{% for page in site.pages %} | |
{% if page.sitemap_exclude != 'y' %} | |
<url> | |
<loc>{{site.production_url}}{{ page.url | remove: 'index.html' }}</loc> | |
</url> | |
{% endif %} | |
{% endfor %} | |
</urlset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment