From 620be19a98b9d80ff998d57e541ccbd9ec52b941 Mon Sep 17 00:00:00 2001 From: vonavi Date: Thu, 3 Jul 2014 00:10:15 +0300 Subject: [PATCH] Sitemap.xml: use Liquid template 'unless' instead of 'if-else'. --- sitemap.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sitemap.xml b/sitemap.xml index 6205533..2ce77c4 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -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 %} {{ site.url }}{{ page.url }} {{ site.time | date: "%Y-%m-%d" }} - {% endif %} + {% endunless %} {% endfor %} {% for post in site.posts %}