Files

40 lines
1.3 KiB
HTML

{{ define "main" }}
<article id="post">
<h1>{{ .Title }}</h1>
<section id="frontmatter">
{{ if ne .PublishDate nil }}
{{ $dateMachine := .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .PublishDate | time.Format "2 Jan 2006" }}
<time datetime="{{ $dateMachine }}">Published {{ $dateHuman }}</time>
{{ else }}
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format "2 Jan 2006" }}
<time datetime="{{ $dateMachine }}">Created {{ $dateHuman }}</time>
{{ end }}
{{ with .Params.author }}
<p>Written by {{ . }}</p>
{{ end }}
{{ with .Params.editor }}
{{ if ne .Params.editor .Params.author }}
<p>Edited by {{ .Params.editor }}</p>
{{ end }}
{{ end }}
{{ with .Params.translator }}
<p>Translated by {{ . }}</p>
{{ end }}
</section>
<section id="content">
{{ .Content }}
</section>
<!-- {{ range .Params.updates }}
<details>
<summary>{{ .mod }}</summary>
{{ with .comment }}
<p>{{ . }}</p>
{{ end }}
</details>
{{ end }} -->
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
</article>
{{ end }}