Skip to content

Commit

Permalink
fix: set default paginate
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Mar 6, 2024
1 parent c2ba3a4 commit d85a2cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/_default/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{- end }}
{{- $pinned := first 1 (where $pages ".Params.pinned" true) }}
{{- $pages = union $pinned $pages }}
{{- $paginator := .Paginate $pages .Site.Params.hb.blog.paginate }}
{{- $paginator := .Paginate $pages (default 12 .Site.Params.hb.blog.paginate) }}
{{ partial "hb/modules/blog/title" . }}
{{- end -}}

Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- define "title" }}
{{- $pages := .RegularPagesRecursive }}
{{- $paginator := .Paginate $pages .Site.Params.hb.blog.paginate }}
{{- $paginator := .Paginate $pages (default 12 .Site.Params.hb.blog.paginate) }}
{{ partial "base/title" . }}
{{- end -}}

Expand Down

0 comments on commit d85a2cb

Please sign in to comment.