Generate multiple html files based on json data file

I’ve read the docs and watched some videos, but I still haven’t found what I’m looking for.

Let’s say I’ve got json like this

{ 
  "BMW" : [
    "335":[ {"0toSixty": 2,3},{"quarterMile": 4,5}
    "345":[ {"0toSixty": 1,3},{"quarterMile": 4,5}
  ],
  "AUDI" : [
    "A1":[ {"0toSixty": 3,3},{"quarterMile": 1232,5},
    "A567":[ {"0toSixty": 3,3},{"quarterMile": 1232,5}]
  ]
}

I’d like Hugo to create mulitiple html files like below

<title>BMW</title>
...
<ul>
  <li>335></li>
...and so on and on

This is simplified. I know how to do layouts and templates, but creating multiple files is my problem.

Any thoughts?

Currently you cannot generate a page from data. See:

1 Like

Many thanks. That “solves” the problem :wink:

Have a look at Eleventy (11ty) pagination: Pagination — Eleventy

You could use 11ty to create Hugo .md files :wink:

2 Likes

I’ll have a look, taa.

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