diff options
author | Shaform <shaform@gmail.com> | 2019-08-16 19:54:55 +0300 |
---|---|---|
committer | Shaform <shaform@gmail.com> | 2019-08-16 19:54:55 +0300 |
commit | 553b158be852cff4893171a29e30d253939d8886 (patch) | |
tree | e8f78bb64b2ed346cee447b202991e20fb661798 /layouts | |
parent | 852df7d961015389c14ccb4153583c7311912688 (diff) |
fix listing problem?
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/index.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/index.html b/layouts/index.html index 1aeeda7..9785558 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -20,7 +20,11 @@ </div> {{ end }} {{ define "main" }} -{{- $paginator := .Paginate (where .Data.Pages "Type" "posts") }} +{{- $pages := .Pages -}} +{{- if .IsHome -}} + {{- $pages = where .Site.RegularPages "Type" "in" "posts" -}} +{{- end -}} +{{- $paginator := .Paginate $pages -}} <div class="archive-container"> <div class="container content archive"> <h2>{{ i18n "latest_posts" }}{{ if $paginator.HasPrev }} <small>- {{ i18n "page" }} {{ $paginator.PageNumber }}</small>{{ end }}</h2> |