mirror of https://github.com/jlelse/GoBlog
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
{{ define "title" }}
|
|
<title>{{ with p .Data "title" }}{{ . }} - {{end}}{{ .Blog.Title }}</title>
|
|
{{ end }}
|
|
|
|
{{ define "main" }}
|
|
<main class=h-entry>
|
|
<article>
|
|
{{ with title .Data }}<h1 class=p-name>{{ . }}</h1>{{ end }}
|
|
{{ if .Data.Published }}
|
|
<p>{{ string .Blog.Lang "publishedon" }} {{ dateformat .Data.Published "02. Jan 2006" }}</p>{{ end }}
|
|
{{ if .Data.Updated }}
|
|
<p>{{ string .Blog.Lang "updatedon" }} {{ dateformat .Data.Updated "02. Jan 2006" }}</p>{{ end }}
|
|
{{ with .Data.Content }}
|
|
<div class=e-content>{{ md . }}</div>
|
|
{{ end }}
|
|
</article>
|
|
{{ $post := .Data }}
|
|
{{ range $i, $tax := .Blog.Taxonomies }}
|
|
{{ $tvs := ps $post $tax.Name }}
|
|
{{ if gt (len $tvs) 0 }}
|
|
<p>In <b>{{ $tax.Title }}</b>:
|
|
{{ range $j, $tv := $tvs }}
|
|
<a href="/{{ $tax.Name }}/{{ urlize $tv }}">{{ $tv }}</a>
|
|
{{ end }}
|
|
</p>
|
|
{{ end }}
|
|
{{ end }}
|
|
</main>
|
|
{{ end }}
|
|
|
|
{{ define "post" }}
|
|
{{ template "base" . }}
|
|
{{ end }} |