mirror of https://github.com/jlelse/GoBlog
34 lines
1.1 KiB
Plaintext
34 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" }} {{ longDate .Data.Published .Blog.Lang }}</p>{{ end }}
|
|
{{ if .Data.Updated }}
|
|
<p>{{ string .Blog.Lang "updatedon" }} {{ longDate .Data.Updated .Blog.Lang }}</p>{{ end }}
|
|
{{ with .Data.Content }}
|
|
<div class=e-content>{{ md . }}</div>
|
|
{{ end }}
|
|
</article>
|
|
{{ $post := .Data }}
|
|
{{ $blog := .Blog }}
|
|
{{ 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="{{ blogRelative $blog ( printf "/%s/%s" $tax.Name (urlize $tv) ) }}">{{ $tv }}</a>
|
|
{{ end }}
|
|
</p>
|
|
{{ end }}
|
|
{{ end }}
|
|
</main>
|
|
{{ end }}
|
|
|
|
{{ define "post" }}
|
|
{{ template "base" . }}
|
|
{{ end }} |