08 Jul 2019, 15:36

How to find next page in section in Hugo
15:36 Monday 08 July 2019 JST

Wow Hugo rules. Thank you, Bep!

I got my journal/ and blog/ indices separated by adding a bit of code to the pagination.


And now the Prev and Next links work based on section.


            <div class="pager">
                 {{with .NextInSection}} <a href="{{.Permalink}}" rel="prev" style="float: left!important">❮ {{.Title}}</a>{{end}}
                 {{with .PrevInSection}} <a href="{{.Permalink}}" rel="next" style="float: right!important"> {{.Title}} ❯</a>{{end}}