Just moving from Jekyll. However, my paginated posts in index and category pages are showing alphabetically. I would like to sort them by lastmod which is defined in each posts frontmatter like lastmod: Nov 02, 2021, but also exclude one category under folder /content/posts/views. Right now I am using this code
{{ $paginator := .Paginate (where .Pages "Type" "posts") }}
{{ range $paginator.Pages }}
// Content Goes Here
{{ end }}
How do I achieve this? I would appreciate a working code also.
I cannot know what’s going on without seeing the project or if that is not possible please share a minimal dummy project that reproduces the issue you describe.
Alright. Done! Thanks. I opened a new support topic about the pagination overriding the number of posts when a certain category is excluded. This post can be closed now.