added more fields to be rendered for post
This commit is contained in:
@@ -1,10 +1,39 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
<article id="post">
|
||||||
<h1>{{ .Title }}</h1>
|
<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" }}
|
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||||
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
{{ $dateHuman := .Date | time.Format "2 Jan 2006" }}
|
||||||
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
<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 }}
|
{{ .Content }}
|
||||||
|
</section>
|
||||||
|
<!-- {{ range .Params.updates }}
|
||||||
|
<details>
|
||||||
|
<summary>{{ .mod }}</summary>
|
||||||
|
{{ with .comment }}
|
||||||
|
<p>{{ . }}</p>
|
||||||
|
{{ end }}
|
||||||
|
</details>
|
||||||
|
{{ end }} -->
|
||||||
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||||
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user