From ed415b0f10702536d22c5efc4b35e5feee07eac8 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 24 Feb 2020 18:51:50 +0000 Subject: [PATCH] Suggest a way to create a stable sitemap --- content/docs/guides/sitemap/contents.lr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/guides/sitemap/contents.lr b/content/docs/guides/sitemap/contents.lr index bb34570d..4c06a702 100644 --- a/content/docs/guides/sitemap/contents.lr +++ b/content/docs/guides/sitemap/contents.lr @@ -38,7 +38,7 @@ skips hidden pages so those will not be generated out. {%- for page in [site.root] if page != this recursive %} {{ page|url(external=true) }} - {{- loop(page.children) }} + {{- loop(page.children|sort(attribute='path')) }} {%- endfor %} ``` @@ -63,7 +63,7 @@ create a `sitemap/contents.lr` file instead and use a template like {% for page in [site.root] if page.record_label recursive %}
  • {{ page.record_label }} {% if page.children %} - + {% endif %}
  • {% endfor %}