I am sure there is a simple explanation to this, but I can’t find it.
Given the following setup in my JSON feed template:
"content_html": {{ $element.Content | jsonify }},
I’m trying to append additional HTML to $element.Content based on a flag in the front matter:
{{ if isset $element.Params "link" }}
"content_html": {{ $element.Content | jsonify }}, // append HTML here
{{ else }}
"content_html": {{ $element.Content | jsonify }},
{{ end }}
I’m not sure of the best way to go about it. I’ve tried using readFile to read the HTML from a local file, but it throws an error saying it’s expecting a string but is instead getting a template.HTML file.