Skip to content

Commit

Permalink
Sort pages by directory
Browse files Browse the repository at this point in the history
  • Loading branch information
moisseev committed Apr 2, 2024
1 parent 7453ce8 commit f37080d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sitemap1.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ title: Site map
## Pages

<ul>
{% for page in site.pages %}
{% assign sorted_pages = site.pages | sort: "dir" %}
{% for page in sorted_pages %}
{% unless page.layout == nil or page.layout == 'none' or page.dir contains '/blog/page' %}
<li><a href="{{ site.url }}{{ site.baseurl }}{{ page.url | remove: 'index.html' }}">{{page.title}}</a> page.dir={{ page.dir }}; page.path={{ page.path }};
page.layout={{ page.layout }}; page.name={{ page.name }}; page.sitemap.exclude={{ page.sitemap.exclude }}; page.exclude= {{ page.exclude }}; </li>
Expand All @@ -20,6 +21,6 @@ title: Site map

<ul>
{% for post in site.posts %}
<li><a href="{{ site.url }}{{ site.baseurl }}{{ post.url }}">{{post.title}}</a> post.published={{ post.published }};</li>
<li><a href="{{ site.url }}{{ site.baseurl }}{{ post.url }}">{{post.title}}</a></li>
{% endfor %}
</ul>

0 comments on commit f37080d

Please sign in to comment.