Make category/tag pages not display bogus results

parent 14c8d9c4
......@@ -5,15 +5,15 @@ layout: listing
---
<ul class="column-balance">
{% capture temptags %}
{% for tag in site.tags %}
{{ tag[1].size | plus: 1000 }}#{{ tag[0] }}#{{ tag[1].size }}
{% endfor %}
{% endcapture %}
{% assign sortedtemptags = temptags | split:' ' | sort | reverse %}
{% assign sortedtemptags = site.tags | sort %}
{% for temptag in sortedtemptags %}
{% assign tagitems = temptag | split: '#' %}
{% capture tagname %}{{ tagitems[1] }}{% endcapture %}
<li><a href="/tag/{{ tagname }}"><nobr>{{ tagname }}</nobr></a></li>
{% capture tagname %}{{ temptag[0] }}{% endcapture %}
{% assign intval = tagname | to_integer %}
{% unless intval > 0 %}
{% unless tagname == "0" %}
<li><a href="/tag/{{ tagname }}"><nobr>{{ tagname }}</nobr></a></li>
{% endunless %}
{% endunless %}
{% endfor %}
</ul>
......@@ -5,15 +5,15 @@ layout: listing
---
<ul class="column-balance">
{% capture tempcategories %}
{% for category in site.categories %}
{{ category[1].size | plus: 1000 }}#{{ category[0] }}#{{ category[1].size }}
{% endfor %}
{% endcapture %}
{% assign sortedtempcategories = tempcategories | split:' ' | sort | reverse %}
{% assign sortedtempcategories = site.categories | sort %}
{% for tempcategory in sortedtempcategories %}
{% assign categoryitems = tempcategory | split: '#' %}
{% capture categoryname %}{{ categoryitems[1] }}{% endcapture %}
<li><a href="/topic/{{ categoryname }}"><nobr>{{ categoryname }}</nobr></a></li>
{% capture categoryname %}{{ tempcategory[0] }}{% endcapture %}
{% assign intval = categoryname | to_integer %}
{% unless intval > 0 %}
{% unless categoryname == "0" %}
<li><a href="/topic/{{ categoryname }}"><nobr>{{ categoryname }}</nobr></a></li>
{% endunless %}
{% endunless %}
{% endfor %}
</ul>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment