fix(paginate): paginate error for empty content (#350)
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{{- /* Paginate */ -}}
|
{{- /* Paginate */ -}}
|
||||||
|
{{- if .Pages -}}
|
||||||
{{- $pages := .Pages.GroupByDate "2006" -}}
|
{{- $pages := .Pages.GroupByDate "2006" -}}
|
||||||
{{- with .Site.Params.section.paginate | default .Site.Params.paginate -}}
|
{{- with .Site.Params.section.paginate | default .Site.Params.paginate -}}
|
||||||
{{- $pages = $.Paginate $pages . -}}
|
{{- $pages = $.Paginate $pages . -}}
|
||||||
@@ -30,5 +31,6 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- partial "paginator.html" . -}}
|
{{- partial "paginator.html" . -}}
|
||||||
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Posts */ -}}
|
{{- /* Posts */ -}}
|
||||||
{{- if ne .Site.Params.home.posts.enable false -}}
|
{{- if ne .Site.Params.home.posts.enable false | and .Site.RegularPages -}}
|
||||||
{{- /* Paginate */ -}}
|
{{- /* Paginate */ -}}
|
||||||
{{- $pages := where .Site.RegularPages "Type" "posts" -}}
|
{{- $pages := where .Site.RegularPages "Type" "posts" -}}
|
||||||
{{- if .Site.Params.page.hiddenFromHomePage -}}
|
{{- if .Site.Params.page.hiddenFromHomePage -}}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{{- /* Paginate */ -}}
|
{{- /* Paginate */ -}}
|
||||||
|
{{- if .Pages -}}
|
||||||
{{- $pages := .Pages.GroupByDate "2006" -}}
|
{{- $pages := .Pages.GroupByDate "2006" -}}
|
||||||
{{- with .Site.Params.list.paginate | default .Site.Params.paginate -}}
|
{{- with .Site.Params.list.paginate | default .Site.Params.paginate -}}
|
||||||
{{- $pages = $.Paginate $pages . -}}
|
{{- $pages = $.Paginate $pages . -}}
|
||||||
@@ -37,5 +38,6 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- partial "paginator.html" . -}}
|
{{- partial "paginator.html" . -}}
|
||||||
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user