Hello everyone!
I am working on a new template, and I have a part of my custom frontmatter defined as follows:
images:
- name: "1.jpg"
ratio: 1.28
- name: "2.jpg"
ratio: 1.33
...
Now I want to use this data in my template, thus I set up a cycle as follows:
{{ range .Params.images }}
<img src="{{ .name }}">
<span>{{ .ratio }}</span>
{{ end }}
To me it feels feel pretty straightforward, yet I get the following error:
can't evaluate field ratio in type string
I searched online, but the cases I could find seem related to other issues.
Could someone help me figure out what’s going on? I am sure it must be a little silly thing.