Display categories in posts
This commit is contained in:
parent
96057eb09d
commit
e340245780
6 changed files with 26 additions and 24 deletions
9
layouts/partials/categories.html
Normal file
9
layouts/partials/categories.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ with .Params.categories }}
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-folder meta-icon"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>
|
||||
|
||||
{{ range . -}}
|
||||
<span class="tag"><a href="{{ "categories/" | absLangURL }}{{ . | urlize }}/">{{.}}</a></span>
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
9
layouts/partials/tags.html
Normal file
9
layouts/partials/tags.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ with .Params.tags }}
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-tag meta-icon"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7" y2="7"></line></svg>
|
||||
|
||||
{{ range . -}}
|
||||
<span class="tag"><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}/">{{.}}</a></span>
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue