Fix pagination
parent
26bc31df07
commit
4ec5202d28
|
@ -9,7 +9,9 @@
|
|||
</article>
|
||||
{{ end }}
|
||||
<div class="columns is-multiline is-mobile">
|
||||
{{ range .Paginator.Pages }}
|
||||
<!-- Custom paginator with only blog posts -->
|
||||
{{ $paginator := .Paginate (where .Site.RegularPages "FirstSection.Section" "posts") }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ if (eq .FirstSection.Section "posts")}}
|
||||
<div class="column is-one-third">
|
||||
{{ .Render "summary" }}
|
||||
|
@ -17,7 +19,7 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{- partial "pagination.html" . -}}
|
||||
{{- partial "pagination.html" $paginator -}}
|
||||
</main>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{ $pag := $.Paginator }}
|
||||
{{ $pag := . }}
|
||||
{{ if gt $pag.TotalPages 1 -}}
|
||||
<nav class="mt-5 pagination is-centered" role="navigation" aria-label="pagination">
|
||||
{{ with $pag.First -}}
|
||||
|
|
Loading…
Reference in New Issue