Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/shaform/hugo-theme-den.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaform <shaform@gmail.com>2019-08-16 19:54:55 +0300
committerShaform <shaform@gmail.com>2019-08-16 19:54:55 +0300
commit553b158be852cff4893171a29e30d253939d8886 (patch)
treee8f78bb64b2ed346cee447b202991e20fb661798 /layouts
parent852df7d961015389c14ccb4153583c7311912688 (diff)
fix listing problem?
Diffstat (limited to 'layouts')
-rw-r--r--layouts/index.html6
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>