tags.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. ---
  2. layout: page
  3. title: 'Tag Index'
  4. ---
  5. {%- capture site_tags -%}
  6. {%- for tag in site.tags -%}
  7. {{- tag | first -}}{%- unless forloop.last -%},{%- endunless -%}
  8. {%- endfor -%}
  9. {%- endcapture -%}
  10. {%- assign tags_list = site_tags | split:',' | sort -%}
  11. {%- for tag in tags_list -%}
  12. <a href="#{{- tag -}}" class="btn btn-primary tag-btn"><i class="fa fa-tag" aria-hidden="true"></i>&nbsp;{{- tag -}}&nbsp;({{site.tags[tag].size}})</a>
  13. {%- endfor -%}
  14. <div id="full-tags-list">
  15. {%- for tag in tags_list -%}
  16. <h2 id="{{- tag -}}" class="linked-section">
  17. <i class="fa fa-tag" aria-hidden="true"></i>
  18. &nbsp;{{- tag -}}&nbsp;({{site.tags[tag].size}})
  19. </h2>
  20. <div class="post-list">
  21. {%- for post in site.tags[tag] -%}
  22. <div class="tag-entry">
  23. <a href="{{ post.url | relative_url }}">{{- post.title -}}</a>
  24. <div class="entry-date">
  25. <time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: site.date_format -}}</time>
  26. </div>
  27. </div>
  28. {%- endfor -%}
  29. </div>
  30. {%- endfor -%}
  31. </div>