pelican-red/templates/tags.html

16 lines
662 B
HTML

{% extends 'base.html' %}
{% block title %}{{ super() }} - Tags{% endblock %}
{% block content_title %}<a href="{{ SITEURL }}/tags.html" rel="bookmark">Tags</a>{% endblock %}
{% block content %}
<p>A list of all tags with article counts is below:</p>
<ul class="tag-list">
{% set all_tags = [] %}
{% for tag, articles in tags %}
{% if all_tags.append({'name': tag.name, 'url': tag.url, 'articles': articles|length() }) %}{% endif %}
{% endfor %}
{% for tag in all_tags | sort(reverse=True, attribute = 'articles') %}
<li><a href="{{ tag.url }}">{{ tag.name }}<span>{{ tag.articles }}</span></a></li>
{% endfor %}
</ul>
{% endblock %}