mirror of https://github.com/jlelse/GoBlog
30 lines
842 B
Plaintext
30 lines
842 B
Plaintext
{{ define "title" }}
|
|
<title>{{ with p . "title" }}{{ . }} - {{end}}{{ blog.Title }}</title>
|
|
{{ end }}
|
|
|
|
{{ define "main" }}
|
|
<main class=h-entry>
|
|
<article>
|
|
{{ with title . }}<h1 class=p-name>{{ . }}</h1>{{ end }}
|
|
{{ with .Content }}
|
|
<div class=e-content>{{ md . }}</div>
|
|
{{ end }}
|
|
</article>
|
|
{{ $taxonomies := blog.Taxonomies }}
|
|
{{ $post := . }}
|
|
{{ range $i, $tax := $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 }} |