Error: Error building site: “/Users/finnlesueur/Git/science.lesueur.nz/content/12ess/as91191/homework.md:7:1”: failed to render shortcode “homework”: failed to process shortcode: “/Users/finnlesueur/Git/science.lesueur.nz/themes/hugo-spartan/layouts/shortcodes/homework.html:7:21”: execute of template failed: template: shortcodes/homework.html:7:21: executing “shortcodes/homework.html” at <$homework.topics>: can’t evaluate field topics in type string
Ah @bep, that does make total sense. I wasn’t aware index could do that.
I do bump into this error, however:
Error: Error building site: “/Users/finnlesueur/Git/science.lesueur.nz/content/11sci/as90940/homework.md:7:1”: failed to render shortcode “homework”: failed to process shortcode: “/Users/finnlesueur/Git/science.lesueur.nz/themes/hugo-spartan/layouts/shortcodes/homework.html:2:16”: execute of template failed: template: shortcodes/homework.html:2:16: executing “shortcodes/homework.html” at <index .Site.Data $key>: error calling index: value is nil; should be of type string
I have verified that $key is the correct string, and I have verified that .Site.Data returns the proper map, with the proper structure. For some reason that index call is returning nil.