Pass key to data map in content front matter?

Hey all, I am having some trouble. I am building a template for robotics teams where a team just needs to update a yaml json file with season information and robot statistics, and a page will automatically be generated for them.

Essentially, I am cloning this to hugo:

I have determined that it is currently not possible to range over a datafile and generate multiple pages. So I was thinking that I would have a datafile like this:

    name: A
    year: 2010
      name: sam
    name: B
    year: 2011
      name: Dave

and in a pages front matter I would pass in something like:

key: "season1"

However, I haven’t been able to find a way to access that key.


I wish something like that would work. If this is not possible does anyone have any recommendations on how to architect this? I would really prefer not to have 100 different params in the front matter outlining robot statistics, competition statistics, photos, and video URLs.

Thanks for the help!

There was a similar thread a couple of weeks ago that may help you:


{{ index .Site.Data.seasons .Params.key }}