summaryrefslogtreecommitdiff
path: root/src/gmi/tpl/posts/index.gmi
blob: 873222b8f9eb2b69b1b23eb0b866cf4d7b585367 (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
# 👻 mediocregopher's Posts

{{ $page := .GetQueryIntValue "page" 0 -}}
{{ $getPostsRes := .GetPosts $page 20 -}}

{{ if eq $page 0 -}}
Here you'll find an archive of all published posts. The content varies almost as much as the quality!

{{ end -}}

{{ if gt $page 0 -}}
=> {{ .RootURL.Posts.Page (.Add $page -1) }} Previous Page

{{ end -}}

{{ range $getPostsRes.Posts -}}
=> {{ $.RootURL.Post .ID }} {{ .PublishedAt.Format "2006-01-02" }} - {{ .Title }}

{{ end -}}

{{ if $getPostsRes.HasMore -}}
=> {{  .RootURL.Posts.Page (.Add $page 1) }} Next page
{{ end }}
========================================

=> {{ .RootURL.Path "feed.xml" }} RSS feed

{{ template "footer.gmi" . }}