Display tags on list.html

This commit is contained in:
koirand 2020-01-15 16:16:46 -10:00
parent 6c75ac5f99
commit 3a954f9c96
3 changed files with 29 additions and 1 deletions

View file

@ -154,6 +154,26 @@ nav li {
background-color: #dddfdf; background-color: #dddfdf;
} }
#tags ul {
max-width: 600px;
margin: 0 auto;
display: flex;
padding: 0;
justify-content: center;
flex-wrap: wrap;
list-style: none;
}
#tags li {
height: 24px;
margin: 5px;
padding: 0 5px;
background-color: #dddfdf;
border-radius: 5px;
font-size: 14px;
/* text-decoration: none; */
}
#contentsList { #contentsList {
padding: 20px 0; padding: 20px 0;
} }

View file

@ -8,7 +8,7 @@ hasCJKLanguage = true
# googleAnalytics = "{your tracking code}" # googleAnalytics = "{your tracking code}"
[taxonomies] [taxonomies]
series = "series" tags = "tags"
[params] [params]
author = "Your Name" author = "Your Name"

View file

@ -7,6 +7,14 @@
</div> </div>
<!-- search results --> <!-- search results -->
<div id="searchResults"></div> <div id="searchResults"></div>
<!-- tags -->
<div id="tags">
<ul>
{{ range .Site.Taxonomies.tags.ByCount }}
<li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}({{ .Count }})</a></li>
{{ end }}
</ul>
</div>
<!-- contents --> <!-- contents -->
<div id="contentsList"> <div id="contentsList">
{{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}} {{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}}