I only want 5 post summaries to be displayed, per page, in my hugo theme
In my config.toml
file I have placed the following value:
pagination = 5
My themes/<theme_name>/layouts/_default/list.html
looks like this:
{{ define "main" }}
<div class="container">
<h1>{{ .Title }}</h1>
{{ range .Paginator.Pages.ByPublishDate.Reverse }}
<p>
<h3><a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
{{ partial "metadata.html" . }}
<p>{{ .Summary }}</p>
</p>
<a href="{{ .RelPermalink }}" className='text-decoration-none'><button type="button" class="btn btn-outline-danger">Read More</button></a>
{{ end }}
{{ template "_internal/pagination.html" . }}
</div>
{{ end }}
Which from everything I've read, including the docs, should work
However this has no effect on my posts page where the list of posts is displayed. I have 6 posts currently, and all posts are listed on the same page, with no pagination settings displayed. There are no errors returned by when doing a hugo server -D
I have tried to remove the .ByPublishDate.Reverse
from the range value, but that also has no effect
I believe I have missed something fundamental, but I'm not sure where to look next. Any help would be appreciated.