How to structure Hugo site with large number of pages?

I have the following site structure:

  • A home page that contains some data (this part is easy I think)
  • Many play pages that display different data. The format of all the play pages are the exact same, only the data is changing. The number of play pages is every-growing and could exceed 1k pages.

I am evaluating between the following options:

Option 1 - Store play pages as individual pages with data inline

With this approach, I would just store the data inline on the page itself, maybe passing it as input to a partial to help render the common elements on the page.

Option 2 - Store data in the data directory

I’m not sure if this buys me anything. Maybe this approach would be cleaner from a layout perspective? I would still be reading the data from somewhere and passing it to a partial.

Option 3 - Something different?

There might be a better, idiomatic solution that I’m missing here since I’m relatively new to Hugo. Thank you in advance.

I like Option 1 because it encapsulates the content of each play into a single file–easier to manage.

This depends how the data looks and how you need to mange it.

I have worked on a number of customer projects where a large number of pages needed to be generated from a data set. In these cases it was easier for the customer to maintain the data in a database/spreadsheet etc.

The pages was then generated via a script (I happen to like python for this).

I have build script that read from local csv/json files as well as script that pull from APIs (e.g. Airtable and Notion).