Suggest a way to create a stable sitemap
This commit is contained in:
parent
066b23400e
commit
ed415b0f10
|
@ -38,7 +38,7 @@ skips hidden pages so those will not be generated out.
|
|||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{%- for page in [site.root] if page != this recursive %}
|
||||
<url><loc>{{ page|url(external=true) }}</loc></url>
|
||||
{{- loop(page.children) }}
|
||||
{{- loop(page.children|sort(attribute='path')) }}
|
||||
{%- endfor %}
|
||||
</urlset>
|
||||
```
|
||||
|
@ -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 %}
|
||||
<li><a href="{{ page|url }}">{{ page.record_label }}</a>
|
||||
{% if page.children %}
|
||||
<ul>{{ loop(page.children) }}</ul>
|
||||
<ul>{{ loop(page.children|sort(attribute='path')) }}</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue