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

#1

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?

#2

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

#3

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.)