@anaurelian were you able to get this to work? I’ve been trying to do something similar, but have been unsuccessful.
I’m trying to range over a number of data files for team members. The file structure I have is:
data
team
john.yaml
steve.yaml
And for simplicity sake each person has two data points
name: john
img: images/john_profile.jpg
And what I would like to do is to range those team member files and be able to call the params within them. So for visual purposes since I understand this is not how the range and the data dir function work, I’d like do to something like this
<div class="row">
{{ range .Site.Data.team .}}
<div class="col">
{{.img}}
{{.name}}
<div>
{{ end }}
<div>
@bep I tried your suggestion above and tried manipulating it a number of times, but keep getting this error
ERROR: 2017/12/06 15:37:00 template.go:529: template: theme/index.html:15: too many declarations in command
Any thoughts? It seems like what @anaurelian and I are trying to do is pretty much the same.