assets/sitemap/posts.xml in fenton-jekyll-boilerplate-0.0.11 vs assets/sitemap/posts.xml in fenton-jekyll-boilerplate-0.0.12

- old
+ new

@@ -5,12 +5,22 @@ <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9.xsd"> -{%- assign posts = site.posts | where: 'nav-sitemap','true' %} -{%- for post in posts %} <url> +{%- assign entries = '' | split:'@' %} +{%- for post in site.posts %} + {%- assign nav_sitemap = post.nav-sitemap | isnil: true %} + {%- if nav_sitemap and post.title %} + {%- capture data -%} + <url> <loc>{{ site.url }}{{ post.url }}</loc> <lastmod>{{ post.date }}</lastmod> </url> + {%- endcapture %} + {%- assign entries = entries | push: data %} + {%- endif %} {%- endfor %} +{%- for entry in entries -%} + {{ entry }} +{%- endfor -%} </urlset> \ No newline at end of file