summaryrefslogtreecommitdiff
path: root/src/gmi/tpl/posts/index.gmi
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmi/tpl/posts/index.gmi')
-rw-r--r--src/gmi/tpl/posts/index.gmi11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gmi/tpl/posts/index.gmi b/src/gmi/tpl/posts/index.gmi
index 2ff296a..873222b 100644
--- a/src/gmi/tpl/posts/index.gmi
+++ b/src/gmi/tpl/posts/index.gmi
@@ -1,29 +1,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 -}}
-{{ $getPostsRes := .GetPosts $page 20 -}}
-
{{ if gt $page 0 -}}
-=> {{ BlogURL "posts" }}/?page={{ .Add $page -1 }} Previous Page
+=> {{ .RootURL.Posts.Page (.Add $page -1) }} Previous Page
{{ end -}}
{{ range $getPostsRes.Posts -}}
-=> {{ PostURL .ID }} {{ .PublishedAt.Format "2006-01-02" }} - {{ .Title }}
+=> {{ $.RootURL.Post .ID }} {{ .PublishedAt.Format "2006-01-02" }} - {{ .Title }}
{{ end -}}
{{ if $getPostsRes.HasMore -}}
-=> {{ BlogURL "posts" }}/?page={{ .Add $page 1 }} Next page
+=> {{ .RootURL.Posts.Page (.Add $page 1) }} Next page
{{ end }}
========================================
-=> {{ BlogURL "feed.xml" }} RSS feed
+=> {{ .RootURL.Path "feed.xml" }} RSS feed
{{ template "footer.gmi" . }}