GoBlog/templates/taxonomy.gohtml

24 lines
756 B
Plaintext

{{ define "title" }}
<title>{{ mdtitle .Data.Taxonomy.Title }} - {{ mdtitle .Blog.Title }}</title>
{{ end }}
{{ define "main" }}
<main>
{{ with .Data.Taxonomy.Title }}<h1>{{ mdtitle . }}</h1>{{ end }}
{{ with .Data.Taxonomy.Description }}{{ md . }}{{ end }}
{{ $blog := .Blog }}
{{ $taxonomy := .Data.Taxonomy.Name }}
{{ range $i, $valueGroup := .Data.ValueGroups }}
<h2>{{ $valueGroup.Identifier }}</h2>
<p>
{{ range $i, $value := $valueGroup.Strings }}
{{ if ne $i 0 }} &bull; {{ end }}<a href="{{ $blog.RelativePath ( printf "/%s/%s" $taxonomy (urlize .) ) }}">{{ . }}</a>
{{ end }}
</p>
{{ end }}
</main>
{{ end }}
{{ define "taxonomy" }}
{{ template "base" . }}
{{ end }}