Merge pull request #93 from thomasjsn/master

Add terms index
This commit is contained in:
Radek Kozieł 2019-09-10 09:35:21 +02:00 committed by GitHub
commit d85cdb04b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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 }}