1

Sitemap.xml: use Liquid template 'unless' instead of 'if-else'.

This commit is contained in:
vonavi 2014-07-03 00:10:15 +03:00
parent 0da7ac1b7d
commit 620be19a98

View File

@ -10,13 +10,12 @@
{% assign exclude = ".htaccess sitemap.xml robots.txt" | split: " " %}
{% for page in site.pages %}
{% assign basename = page.url | split: "/" | last %}
{% if exclude contains basename %}
{% else %}
{% unless exclude contains basename %}
<url>
<loc>{{ site.url }}{{ page.url }}</loc>
<lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
</url>
{% endif %}
{% endunless %}
{% endfor %}
{% for post in site.posts %}