mirror of
https://github.com/rvtr/wiki.git
synced 2025-10-31 06:31:13 -04:00
Fix pages not in categories
This commit is contained in:
parent
5a372c0ec0
commit
24148f873c
@ -32,24 +32,27 @@ layout: compress
|
||||
<!-- First do the index -->
|
||||
{% for item in items %}
|
||||
{% if item.url contains "index.html" %}
|
||||
<li class="{% unless item contains category %}li-bullet{% endunless %} {% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||
<li class="li-bullet {% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% assign noCat = items | where: "category", nil %}
|
||||
{% for item in noCat %}
|
||||
{% unless item.url contains "index.html" %}
|
||||
<li class="li-bullet {% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
<!-- Then the other pages -->
|
||||
{% for cat in categories %}
|
||||
<li>
|
||||
<details {% if page.category contains cat %}open{% endif %}>
|
||||
<summary>{{ cat }}</summary>
|
||||
<ul>
|
||||
{% for item in items %}
|
||||
{% unless item.category contains cat%}
|
||||
{% continue %}
|
||||
{% endunless %}
|
||||
{% if item.url contains "index.html" %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
<li class="{% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% for item in items %}
|
||||
{% unless item.category contains cat %}
|
||||
{% continue %}
|
||||
{% endunless %}
|
||||
<li class="{% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user