mirror of https://github.com/lxndrblz/anatole.git

Esteban Torres
18.11.2020 c86b1adcceb047425c22b732f2e87e29b5dceab2
Make pagination sections configurable

As mentioned [in the `where` docs from `hugo`](https://gohugo.io/functions/where/#mainsections) with regards to `mainSections`.
1 files modified
4 ■■■■ changed files
layouts/index.html 4 ●●●● patch | view | raw | blame | history
layouts/index.html
@@ -1,5 +1,5 @@
{{ define "main" }}
  {{ $paginator := .Paginate (where .Site.RegularPages "Type" "post") }}
  {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
  {{ range $paginator.Pages }}
  <div class="post animated fadeInDown">
    <div class="post-title">
@@ -25,4 +25,4 @@
<div class="pagination">
  {{ template "_internal/pagination.html" . }}
</div>
{{ end }}
{{ end }}