Fix pages in categories (it worked for me...)

Why does that work for me but not GitHub Pages?
This commit is contained in:
Pk11 2020-12-23 00:20:01 -06:00
parent 24148f873c
commit 735b7ddc05

View File

@ -35,13 +35,13 @@ layout: compress
<li class="li-bullet {% 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 %} <!-- Then the pages not in categories -->
{% for item in noCat %} {% for item in items %}
{% unless item.url contains "index.html" %} {% unless item.url contains "index.html" or item.category %}
<li class="li-bullet {% 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>
{% endunless %} {% endunless %}
{% endfor %} {% endfor %}
<!-- Then the other pages --> <!-- Finally, 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 %}>