I am trying to write multiple descriptions in a post,
This is my frontmatter:
description:
subtitle: Sub1
subdescription: Desc1
subtitle: Sub2
subdescription: Desc2
and in my html:
{{ range .description }}
<h1>{{ .description.subtitle }}</h1>
<p>{{ .description.subdescription }}</p>
{{end}}
I tried that initially but I get a: can’t evaluate field categories in type interface {}
error
So after some testing i found with this:
{{ range .my_description }}
<h1>{{ . }}</h1>
{{end}}
It writes out all of the data from the dictionary,
problem is is that, I cant seem to write out specific items for if i wanted to incase them in an html element,
this is what i tried : {{ .Params.my_description.subtitle }} ; {{ .subtitle }}
but these didnt work.
additionally, i found that if i have two identical items in my dictionary, it wouldnt take the first pieces of data but would write out the last ones.
What am I missing here.