Created
September 3, 2014 18:51
-
-
Save Silverneo/66009a43e9603e7f05e7 to your computer and use it in GitHub Desktop.
sitemap.xml template
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
<?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 }}</loc> | |
{% if post.lastmod == null %} | |
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod> | |
{% else %} | |
<lastmod>{{ post.lastmod | date_to_xmlschema }}</lastmod> | |
{% endif %} | |
<changefreq>weekly</changefreq> | |
<priority>1.0</priority> | |
</url> | |
{% endfor %} | |
{% for page in site.pages %} | |
{% if page.sitemap != null and page.sitemap != empty %} | |
<url> | |
<loc>{{ site.production_url }}{{ page.url }}</loc> | |
<lastmod>{{ page.sitemap.lastmod | date_to_xmlschema }}</lastmod> | |
<changefreq>{{ page.sitemap.changefreq }}</changefreq> | |
<priority>{{ page.sitemap.priority }}</priority> | |
</url> | |
{% endif %} | |
{% endfor %} | |
</urlset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment