mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-12-25 23:39:27 +01:00
Add terms index
This commit is contained in:
parent
40b5b2b887
commit
47cf967ba8
18
layouts/_default/terms.html
Normal file
18
layouts/_default/terms.html
Normal file
@ -0,0 +1,18 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="archive">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<ul>
|
||||
{{ $type := .Type }}
|
||||
{{ range $key, $value := .Data.Terms.Alphabetical }}
|
||||
{{ $name := .Name }}
|
||||
{{ $count := .Count }}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
||||
<h3 class="archive__post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Name }} ({{ $count }})</a>
|
||||
</h3>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
Loading…
Reference in New Issue
Block a user