fix tag lists

This commit is contained in:
user 2022-11-28 23:34:46 +00:00
parent 49b9e42176
commit c71611533a
2 changed files with 4 additions and 7 deletions

View file

@ -17,9 +17,8 @@
{% endif %}
</p>
<p class="places-list__tags">
{% assign tags = place.data.tags | sort %}
{% for tag in tags %}{% unless forloop.first %}, {% endunless %}
{{ tag }}{% endfor %}
{% capture sorted_tags %}{{ place.data.tags | sort | join: ", " }}{% endcapture %}
{{ sorted_tags | remove: ", places" | remove: "places, " | remove: "places" }}
</p>
{% endif %}
</li>

View file

@ -36,10 +36,8 @@ layout: default
<p>
<small class="place-tags">
Tags:
{% assign tags = tags | sort | remove: "places" %}
{% for tag in tags %}{% unless forloop.first %}, {% endunless %}
{% assign tag_page = site.tags | where: "slug", tag | first %}
{% if tag_page %}<a href="{{ tag_page.url }}">{% endif %}{{ tag }}{% if tag_page %}</a>{% endif %}{% endfor %}
{% capture sorted_tags %}{{ tags | sort | join: ", " }}{% endcapture %}
{{ sorted_tags | remove: ", places" | remove: "places, " | remove: "places" }}
</small>
</p>
</div>