[lektor-website-197] Adding plugins/tags page.

This commit is contained in:
Joseph Nix 2018-12-15 01:01:20 -06:00
parent b71bd8499f
commit 244e2e385c
4 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,5 @@
_model: page
---
title: tags
---
_template: plugin-tags.html

View File

@ -28,4 +28,6 @@
<div class="plugin">
{{ render_plugin_list(this.items) }}
</div>
<p>View a list of all Lektor plugin tags <a href="/plugins/tags">here</a>.</p>
{% endblock %}

View File

@ -0,0 +1,24 @@
{% extends "plugin.html" %}
{% block body %}
<h1>Plugin Tags</h1>
<p>
This is a list of all tags that Lektor plugins have.
Click on individual tags to see which plugins use that tag.
</p>
<div class="row">
{% set tags = this.parent.children.distinct("tags")|rejectattr("tags") %}
{% for column in tags|sort|slice(3) %}
<div class="col-md-4 child">
<ul>
{% for tag in column %}
<li><a href="{{ ('/plugins/tag/' ~ tag.lower() ~ '/')|url }}">{{ tag }}</a></li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@ -68,6 +68,7 @@
{% else %}
<p>Plugin has no tags.</p>
{% endif %}
<p>View <a href="/plugins/tags">all tags</a>.</p>
</div>
<div class="col-sm-9 doc-styling">