Skip to content

Commit

Permalink
🐛 Fix bug after formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Feb 25, 2024
1 parent 7b14395 commit bd622da
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,35 @@
hideHomeActive: true
---

{% capture site_cats %}{% for cat in site.categories %}{{ cat | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign cats_list = site_cats | split:',' | sort %}
<ul class="entry-meta inline-list">
{% assign cats_list = site.categories | map: 'first' | sort %}
{% for cat in cats_list %}
{% for item in (0..site.categories.size) %}
{% unless forloop.last %}
{% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
<li>
<a href="#{{ cat }}" class="tag">
<span class="term">{{ cat }}</span>
<span class="count">{{ site.categories[cat].size }}</span>
<a href="#{{ this_word }}" class="tag">
<span class="term">{{ this_word }}</span>
<span class="count">{{ site.categories[this_word].size }}</span>
</a>
</li>
{% endunless %}
{% endfor %}
</ul>

{% for cat in cats_list %}
<span class="anchor-bookmark" id="{{ cat }}"></span>
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
<span class="anchor-bookmark" id="{{ this_word }}"></span>
<article>
<h2 class="tag-heading">{{ cat }}</h2>
<h2 class="tag-heading">{{ this_word }}</h2>
<ul class="tag-list">
{% for post in site.categories[cat] %}
{% if post.title and post.hide != true %}
{% for post in site.categories[this_word] %}
{% if post.title != null and post.hide != true %}
<li class="entry-title">
<a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">
<span class="tag-time">【{{ post.date | date: "%Y-%m-%d" }}】</span>{{ post.title }}</a>
</li>
<span class="tag-time">【{{ post.date | date: "%Y-%m-%d" }}】</span>{{post.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
</article>
{% endunless %}
{% endfor %}

0 comments on commit bd622da

Please sign in to comment.