WIP: blog: expose tags more regularly to encourage use for searching for content
This commit is contained in:
parent
2891da25f5
commit
02fbce8f27
@ -11,6 +11,7 @@
|
||||
<h2>{{ .Title }}</h2>
|
||||
{{ partial "authors" .}}
|
||||
<p class="date">{{ dateFormat "Jan 2, 2006" .Date }}</p>
|
||||
{{ partial "tags-list" . }}
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ $related := (where (.Site.RegularPages.Related .) "Type" "posts") | first 3 }}
|
||||
|
@ -6,5 +6,6 @@
|
||||
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||
<p>{{ .Params.Excerpt }}</p>
|
||||
{{ partial "tags-list" . }}
|
||||
</div>
|
||||
</div>
|
||||
|
10
site/themes/pinniped/layouts/partials/tags-list.html
Normal file
10
site/themes/pinniped/layouts/partials/tags-list.html
Normal file
@ -0,0 +1,10 @@
|
||||
<p style="background-color: #eee; padding-left: 5px; padding-right: 5px">
|
||||
{{ $tagsCount := .Params.Tags | len }}
|
||||
{{ $commaCount := sub $tagsCount 2 }}
|
||||
{{ range $i, $tag := .Params.Tags }}
|
||||
<span>
|
||||
<a style="font-size: 10px"
|
||||
href="{{ "/tags/" | relLangURL }}{{ $tag | urlize }}">{{ . }}</a>{{ if le $i $commaCount }},{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</p>
|
Loading…
Reference in New Issue
Block a user