Created
February 24, 2015 16:05
-
-
Save justinhillsjohnson/a6275753ad014c02803d to your computer and use it in GitHub Desktop.
locomotivecms-sitemap-liquid
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
--- | |
title: Sitemap | |
slug: sitemap | |
is_layout: false | |
listed: false | |
published: true | |
cache_strategy: none | |
response_type: text/xml | |
position: 1 | |
--- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
{% for page in site.pages %} | |
{% if page.published? and page.listed? %} | |
{% case page.slug %} | |
{% when 'index' %} | |
<url> | |
<loc>http://{{ host }}</loc> | |
<lastmod>{{ now | date: "%F" }}</lastmod> | |
<changefreq>weekly</changefreq> | |
<priority>0.5</priority> | |
</url> | |
{% else %} | |
<url> | |
<loc>http://{{ host }}/{{ page.fullpath }}</loc> | |
<lastmod>{{ now | date: "%F" }}</lastmod> | |
<changefreq>weekly</changefreq> | |
<priority>0.5</priority> | |
</url> | |
{% endcase %} | |
{% endif %} | |
{% endfor %} | |
</urlset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment