Pagination creates both /pages/ and /section/page/

I have a Hugo site for a podcast, so only section is ‘episode’ and all pages are under that.

I have set up a Paginator:

{{ $paginator := .Paginate (where .Data.Pages “Section” “episode”) 3 }}

However, I get generated paginator pages for both /page/x/index.html and /episode/page/x/index.html.

I haven’t overridden the default paginator config, so I only want to keep the /page/x/ files. Can I stop Hugo generating them per-section?

Please follow the advice at Requesting Help and share your site’s repo. :slight_smile:

I suspect that your /page/x/ and /episode/page/x/ pages use the same Hugo template. In other words, the paginator code may be in a template that is used by both pages.

Perhaps comparing Hugo’s lookup order with your theme templates can how why this happens. (If it’s something else, we’ll need a bit more information – see Maiki’s comment above.)

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.