[lektor-website-197] Fixing url pathing of plugin tags with upper case letters.

This commit is contained in:
Joseph Nix 2018-12-15 12:14:42 -06:00
parent 489f34e988
commit f010714d35
5 changed files with 13 additions and 4 deletions

View File

@ -16,4 +16,5 @@ lektor-markdown-header-anchors = 0.1
lektor-markdown-highlighter = 0.1
lektor-markdown-admonition = 0.1
lektor-atom = 0.2
lektor-tags = 0.1
lektor-tags = 0.3
lektor-slugify = 0.4

View File

@ -1,2 +1,3 @@
parent = /plugins
template = plugin-tag.html
url_path = {{ this.parent.url_path }}tag/{{ tag|slug(lowercase=False) }}

View File

@ -9,12 +9,12 @@
</p>
<div class="row">
{% set tags = this.parent.children.distinct("tags")|rejectattr("tags") %}
{% set tags = this.parent.children.distinct("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>
<li><a href="{{ ('/plugins@tag/' ~ tag ~ '/')|url }}">{{ tag }}</a></li>
{% endfor %}
</ul>
</div>

View File

@ -63,7 +63,7 @@
{% if this.tags %}
{% for t in this.tags|sort %}
{{ "and " if loop.last }}
<a href="{{ ('/plugins/tag/' ~ t.lower() ~ '/')|url }}">{{ t }}</a>{{ ", " if not loop.last }}
<a href="{{ ('/plugins@tag/' ~ t ~ '/')|url }}">{{ t }}</a>{{ ", " if not loop.last }}
{% endfor %}
{% else %}
<p>Plugin has no tags.</p>

View File

@ -21,4 +21,11 @@
{{ render_plugin_list(category.children) }}
</div>
{% endfor %}
<h2>Tags</h2>
<p>
Plugins are also tagged with keywords and topics.
Their tags are listed on their page and are navigable.
You can view a list of all of the tags <a href="/plugins/tags">here</a>.
</p>
{% endblock %}