Pagination in single content type page

I was previously working on a Jekyll site, but after searching for almost a week to solve a simple problem, I decided to give Hugo a go. But it appears I’m running into the same issue here.

My site structure looks like this:

 content:
     - product
          - product1.md
          - product2.md
     - category
          - toys.md
          - sport.md
     - collection
          - summer.md

A product will have the following front matter
title: “Some title”
themes: [“summer”]
categories: [“toys”]

I now want to generate a page per collection and per category. Each page will contain a list of products that are linked to it.

If I use .Paginate in layouts/theme/single.html, I’m getting the following error:

error calling Paginate: Paginators not supported for pages of type “page” (“Summer”)

Is there any other way I can do this? There reason for creating different content types for category and collection is because there is more content than just a list of pages.

You need to somehow “not use a single page”. Sections are the obvious choice.

How would that work if a product can belong to multiple sections? The documentation is not very clear on this.

With Sections it’s not very straightforward to do what you ask -it can be done but it involves a few hacks-

The supported and documented way is to assign taxonomies to your content so that it appears under several list pages.