Skip to content

Commit 447304a

Browse files
committed
add tags to blog
1 parent ff6e1ec commit 447304a

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

blog/index.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,23 @@
33
layout: home-beautiful
44
---
55

6+
7+
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
8+
9+
{%- capture site_tags -%}
10+
{%- for tag in site.tags -%}
11+
{{- tag | first -}}{%- unless forloop.last -%},{%- endunless -%}
12+
{%- endfor -%}
13+
{%- endcapture -%}
14+
{%- assign tags_list = site_tags | split:',' | sort -%}
15+
<div class="float-right col-md-4 col-sm-12">
16+
<div class="card">
17+
18+
<div class="card-body">
19+
20+
{%- for tag in tags_list -%}
21+
<a href="{{'/blog/tags/#' | append: tag }}" class="btn btn-primary btn-sm tag-btn"><i class="fas fa-tag" aria-hidden="true"></i>&nbsp;{{- tag -}}&nbsp;({{site.tags[tag].size}})</a>
22+
{%- endfor -%}
23+
</div>
24+
</div>
25+
</div>

0 commit comments

Comments
 (0)