1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Hide the empty trending tags from panel.

This commit is contained in:
Cotes Chung
2020-06-01 22:59:09 +08:00
parent 75c57d1725
commit b28724b4d4
4 changed files with 7 additions and 3 deletions

View File

@@ -45,18 +45,22 @@
{% endif %} <!-- site.data.updates -->
{% include trending_tags.html %}
{% if trending_tags.size > 0 %}
<div id="access-tags">
<h3 data-toc-skip>
{{- site.data.label.panel.trending_tags -}}
</h3>
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
{% include trending-tags.html %}
{% for tag in trending_tags %}
{% capture url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %}
<a class="post-tag" href="{{ url | relative_url }}">{{ tag | replace: '-', ' ' }}</a>
{% endfor %}
</div>
</div>
{% endif %}
</div> <!-- .access -->