{% extends "base.html" %} {% from "macros/tag-links.html" import tag_links with context %} {% block body %} {% set matches = namespace(items=[]) %} {% for section_id in ['projects', 'blog', 'articles'] %} {% for item in site.query('/' ~ section_id) %} {% set item_tags = item.taxonomy_tags if item._model == 'project' else item.tags %} {% if this._id in item_tags %}{% set matches.items = matches.items + [item] %}{% endif %} {% endfor %} {% endfor %} {% for project in site.query('/projects') %} {% if project._model == 'project' %} {% set devlog = site.get(project.path ~ '/devlog') %} {% if devlog %} {% for entry in devlog.children %} {% if this._id in entry.topic_tag_slugs %}{% set matches.items = matches.items + [entry] %}{% endif %} {% endfor %} {% endif %} {% endif %} {% endfor %}

Tag

{{ this.title }}

{{ this.summary }}

Tagged {{ this.title }} {{ matches.items|length }} {% if matches.items|length == 1 %}entry{% else %}entries{% endif %}
{% if matches.items %}
{% for item in matches.items|sort(attribute='date', reverse=true) %} {% set item_tags = item.taxonomy_tags if item._model == 'project' else (item.topic_tag_slugs if item._model == 'devlog-entry' else item.tags) %} {% endfor %}
{% else %}

No projects, devlog entries, blog entries, or articles use this tag yet.

{% endif %}
{% endblock %}