I’m in the process of porting a theme from Hugo to Jekyll and in Hugo there is this idea called “shortcodes” or small snippets of html that can be included as a variable in a layout.
I don’t see where Jekyll has this, so I figured the best substitute was to just make an include out of it and include it where needed.
So far so good until I needed to include it if a variable is defined in the page front matter.
The variable content is multi-line and Jekyll doesn’t like this and complains. I haven’t found the magic sauce to allow a multi-line variable in a single front matter variable.
In _config.yml there is a syntax for this very thing, but it isn’t supported from front matter.
Once I figure out how to use the multi-line variable the if var exists then include that part should work just fine.
Thanks for your attention