better post metadata

This commit is contained in:
Niklas Buschmann
2019-12-21 22:27:34 +01:00
parent c3aba6dedf
commit 67938a4494
5 changed files with 30 additions and 24 deletions

View File

@@ -2,8 +2,12 @@
<article>
<header>
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
{{ if .Date }}<p class="meta"><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "January 02, 2006" }}</time></p>{{ end }}
{{ range $index, $tag := .Params.categories }}
{{- if gt $index 0 }}, {{ end -}}
<a href="{{ ($.Site.GetPage (printf "/%s/%s" "categories" $tag)).Permalink }}">{{ $tag | upper }}</a>
{{- end -}}
<h1>{{ .Title }}</h1>
<p>{{ if ($.Param "author") }}{{ $.Param "author" }}{{ end }}{{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ if ($.Param "author") }} | {{ end }}{{ .Date.Format "January 02, 2006" }}</time>{{ end }}</p>
</header>
{{ .Content }}
</article>