fix tag lists
This commit is contained in:
parent
49b9e42176
commit
c71611533a
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue