layout permalink /sitemaps.xml {% for post in site.posts %} {% if post.id contains "404" %}{% else %} {{site.base}}{{ post.url }} {% assign versions=site.posts | where:"ref", post.ref %} {% for version in versions %} {% endfor %} {{ post.date | date_to_xmlschema }} weekly {% endif %} {% endfor %} {% for page in site.pages %} {% if page.id contains "404" %}{% else %} {{site.base}}{{ page.url }} {% assign versions=site.pages | where:"ref", page.ref %} {% for version in versions %} {% endfor %} weekly {% endif %} {% endfor %}