I’d like to embed some Codepens into some of my posts, but I’d like to use the prefill embeds which allow me to supply code to use for HTML and CSS. So, I’d create test.html and test.css in /static/code and reference them with a shortcode in my post like this, ideally:
{{< codepen markup="test" style="test" >}}
My initial idea was to set up a shortcode called codepen.html like the following:
And the error I get (presumably because I can’t run a shortcode readFile within a shortcode?) is:
ERROR 2023/03/26 10:28:02 Rebuild failed: process: loading templates: "/layouts/partials/codepen.html:4:1": parse failed unexpected "<" in command
Total in 15 ms
What is the better method for me to give file prompts to feed into an existing shortcode like this, but that will still need to read the file?