Fix tag links, add article counts to tag and category pages
diff --git a/templates/categories.html b/templates/categories.html
index 7351088..3f298a4 100644
--- a/templates/categories.html
+++ b/templates/categories.html
@@ -6,7 +6,7 @@
<div class="article_text">
<ul>
{% for category, articles in categories %}
- <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li>
+ <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
{% endfor %}
</ul>
</div>
diff --git a/templates/tags.html b/templates/tags.html
index c49ef3b..a93c89a 100644
--- a/templates/tags.html
+++ b/templates/tags.html
@@ -5,8 +5,8 @@
<article>
<div class="article_text">
<ul>
- {% for tag in tag_cloud %}
- <li><a href="{{ SITEURL }}/tag/{{ tag.0|string|replace(" ", "-" ) }}.html">{{ tag.0 }}</a></li>
+ {%- for tag, articles in tags|sort %}
+ <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
{% endfor %}
</ul>
</div>