Sitemap.xml: use Liquid template 'unless' instead of 'if-else'.
This commit is contained in:
parent
0da7ac1b7d
commit
620be19a98
@ -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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user