mirror of
https://github.com/jlelse/GoBlog
synced 2024-06-29 12:07:36 +00:00
Jan-Lukas Else
70f220e693
API endpoint to create posts from Hugo markdown file Method to create redirects Dependency updates ...
32 lines
1022 B
Plaintext
32 lines
1022 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 .Published }}<p>Published on {{ dateformat . "02. Jan 2006" }}</p>{{ end }}
|
|
{{ with .Updated }}<p>Updated on {{ dateformat . "02. Jan 2006" }}</p>{{ 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 }} |