I’m trying to keep my markdown clean by shifting html production to short codes. So for example, some pseudocode:
{{< div >}}
{{< somehtmlcontent >}}
{{< /div >}}
Inside {{< somehtmlcontent >}}
will be
<b>Helo my dear</b>
<a href="mailto:whatever@gohugo.io">whatever@gohugo.io</a>
{{ partial "somemorehtml.html" }}
So what happens is that Hello my dear
renders fine, but the rest of {{< somehtmlcontent >}}
is dumped side <pre><code></code></pre>
and no longer functions as HTML.
I’ve tried fiddling with using {{% div %}}
and piping to safeHTML
and markdownify
, and I tried looking into the Goldmark configuration, but nothing I did stopped Hugo from inserting <pre><code>
tags in there.
I’ve read the following comment (Edit, sorry that was the wrong link):
It is suggested that structures like the {{< div >}}
tag should be broken up into two short codes, one to open and one to close. Is that all we got?
Thanks.