GoBlog/templates/taxonomy.gohtml

20 lines
552 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 16:47:23 +00:00
{{ $taxonomy := .Data.Taxonomy.Name }}
{{ range $i, $value := (sort .Data.TaxonomyValues) }}
2020-09-01 16:53:21 +00:00
<li><a href="/{{ $taxonomy }}/{{ urlize . }}">{{ . }}</a></li>
{{ end }}
</ul>
2020-08-31 19:12:43 +00:00
</main>
{{ end }}
{{ define "taxonomy" }}
{{ template "base" . }}
{{ end }}