GoBlog/templates/taxonomy.gohtml

21 lines
615 B
Plaintext
Raw Normal View History

2020-08-31 19:12:43 +00:00
{{ define "title" }}
2020-10-12 16:47:23 +00:00
<title>{{ .Data.Taxonomy.Title }} - {{ .Blog.Title }}</title>
2020-08-31 19:12:43 +00:00
{{ end }}
{{ define "main" }}
<main>
2020-10-12 16:47:23 +00:00
{{ with .Data.Taxonomy.Title }}<h1>{{ . }}</h1>{{ end }}
{{ with .Data.Taxonomy.Description }}{{ md . }}{{ end }}
<ul>
2020-10-12 17:26:32 +00:00
{{ $blog := .Blog }}
2020-10-12 16:47:23 +00:00
{{ $taxonomy := .Data.Taxonomy.Name }}
{{ range $i, $value := (sort .Data.TaxonomyValues) }}
2020-11-03 17:00:03 +00:00
<li><a href="{{ blogrelative $blog ( printf "/%s/%s" $taxonomy (urlize .) ) }}">{{ . }}</a></li>
2020-09-01 16:53:21 +00:00
{{ end }}
</ul>
2020-08-31 19:12:43 +00:00
</main>
{{ end }}
{{ define "taxonomy" }}
{{ template "base" . }}
{{ end }}