<!--
  The trending tags list
  v2.0
  https://github.com/cotes2020/jekyll-theme-chirpy
  Â© 2019 Cotes Chung
  MIT Licensed
-->

{% assign MAX = 10 %}

{% capture tags_array %}
  {% for tag in site.tags %}
    {{ tag[1] | size }}:{{ tag[0] | replace: ' ', '-' }}
  {% endfor %}
{% endcapture %}

{% assign trends = tags_array | split: " " | sort | reverse %}
{% assign count = 0 %}

{% for trend in trends %}
  {% assign count = count | plus: 1 %}
  {% assign tag = trend | split: ":" | last  %}
  <a class="p