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 -->
|
<!-- First do the index -->
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
{% if item.url contains "index.html" %}
|
{% 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 %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% 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 -->
|
<!-- Then the other pages -->
|
||||||
{% for cat in categories %}
|
{% for cat in categories %}
|
||||||
<li>
|
<li>
|
||||||
<details {% if page.category contains cat %}open{% endif %}>
|
<details {% if page.category contains cat %}open{% endif %}>
|
||||||
<summary>{{ cat }}</summary>
|
<summary>{{ cat }}</summary>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
{% unless item.category contains cat%}
|
{% unless item.category contains cat %}
|
||||||
{% continue %}
|
{% continue %}
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
{% if item.url contains "index.html" %}
|
<li class="{% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||||
{% continue %}
|
{% endfor %}
|
||||||
{% endif %}
|
|
||||||
<li class="{% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
</ul>
|
||||||
</details>
|
</details>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user