But note that the caveat is that the rendered shortcode will not be part of the “outer rendering” (so to speak), which is not optimal if they contain headings/footnotes that needs to be in the ToC etc.
I’m not sure what the solution here is? I am already using the delimiter in the markdown file but still get the omission issue. What are you suggesting to do?
Is it possible to support multiple layouts directory like how static works? I like the unsafe = false direction but there are situations where I want certain partials to be privatized.
Disclaimer: I’m maintaining a Hugo Theme which has its own Hugo site generator hosting the page. Things like Paypal button broke but can be solved nicely using partials and short-code.
Just in case anyone find this post like me looking for a way to add HTML to their markdown page, I ended up doing the following…
Create a custom shortcode called something like raw-html.html with the contents:
{{ .Inner }}
Then wrap your HTML in your content like so:
{{< raw-html >}}
<video width="480" height="480" autoplay muted loop playsinline>
<source src="https://i.giphy.com/media/687qS11pXwjCM/giphy.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
{{< / raw-html >}}
Not saying this is a good idea or solution, but it seems to work.