hugo-theme-contentful/layouts/_default/terms.html
Gabriel Arazas 86346b1af1 Change '.Date' to '.PublishDate'
It's better for three reasons:

* It is a predefined frontmatter variable from Hugo.
* When unset, it is basically the '.Date'.
* More specific and the 'date' variable can now be assigned for the
creation date.
2020-11-06 02:25:43 +08:00

25 lines
661 B
HTML

{{ define "main" }}
{{ .Content }}
<h1>{{ .Title }}</h1>
{{- range .Data.Terms }}
{{- $pages := .Pages }}
{{- if ge (len $pages) 1 }}
<header id="{{ .Page.Title | urlize }}" class="taxonomy__header">
<h2>{{ .Page.Title }}</h2>
<small>(<a href="{{ .Page.RelPermalink }}">{{ i18n "permalink" | default "Permalink" }}</a>)</small>
</header>
<ul class="taxonomy__pages">
{{- range $pages }}
<li class="taxonomy__page">
<date datetime="{{ .PublishDate }}">{{ .PublishDate.Format "2006-01-02" }}</date>
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
</li>
{{- end }}
</ul>
{{- end }}
{{- end }}
{{ end }}