Skip to content

Commit

Permalink
Split dir
Browse files Browse the repository at this point in the history
  • Loading branch information
moisseev committed Apr 2, 2024
1 parent f37080d commit 6544d62
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sitemap1.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ title: Site map
{% 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>
{% unless page.dir == prev_page_dir %}
{% assign path = page.dir | split: "/" %}
{% for dir in path %}
{{ dir }}{% unless forloop.last %} /
{% endunless %}
{% endfor %}
{% endunless %}
{% assign prev_page_dir = page.dir %}
<li><a href="{{ site.url }}{{ site.baseurl }}{{ page.url | remove: 'index.html' }}">{{page.title}}</a> page.path={{ page.path }};
page.layout={{ page.layout }}; page.name={{ page.name }}; </li>
{% endunless %}
{% endfor %}
</ul>
Expand Down

0 comments on commit 6544d62

Please sign in to comment.