In my frontmatter I have an array of objects. I’d like to pass these to a shortcode that renders a “card list”. I am trying to pass the variable from the frontmatter, to the shortcode, but I’m facing errors.
+++
windowTypes = [
{ title="Awning Windows", img="/img/window-types/awning.svg", description="Awning windows are a type of casement window that are hinged at the top and open outward from the frame. They are generally made for openings in which the width is greater than the height. They allow for maximum ventilation without letting in rain." },
{ title="Casement Windows", img="/img/window-types/casement.svg", description="Casement windows are side-hinged with sashes that open outwards from the frame. They provide significant ventilation when open. When closed they provided maximum energy efficeny by limiting heat leakage to a minimum." },
]
+++
How do I pass this variable into a shortcode? I’ve tried the following:
{{< CardList items=windowTypes >}}
But get an error:
ERROR 2019/03/16 21:54:54 “E:\Projects\impressive\frontend\content\upvc-windows-solihull.md:23:20”: unterminated quoted string in shortcode parameter-argument: 'windowTypes >}}
Is it possible to do this at all?