summaryrefslogtreecommitdiff
path: root/src/gmi/tpl/posts/post.gmi
blob: 4f58c84000cf8185ea4024d14bc28c765ef9aeee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{{ $post := .GetPostByID (.GetQueryValue "id" "") -}}

# {{ $post.Title }}

{{ if ne $post.Description "" -}}
> {{ $post.Description }}
{{ end -}}

{{ $post.Body }}

--------------------------------------------------------------------------------

Published {{ $post.PublishedAt.Format "2006-01-02" }}

{{- if $post.Series }}

This post is part of a series!

{{ $seriesNextPrev := .GetPostSeriesNextPrevious $post -}}

{{ if $seriesNextPrev.Next -}}
=> /posts/{{ $seriesNextPrev.Next.ID }}.gmi Next: {{ $seriesNextPrev.Next.Title }}
{{ end -}}

{{ if $seriesNextPrev.Previous -}}
=> /posts/{{ $seriesNextPrev.Previous.ID }}.gmi Previously: {{ $seriesNextPrev.Previous.Title }}
{{ end -}}

{{ end }}
================================================================================

=> /posts/ More posts
=> /       Home