Markdown doesn’t seem to support centering text on its own, so I believe that I have to use html. According to the documentation, this is best done using a shortcode. So I defined the following shortcode:
<p style="text-align: center;">{{.Inner}}</p>
And then I try to use it as follows:
{{% center %}}
test
*emphasized test*
{{% /center %}}
In the resulting html, I obtain <!-- raw HTML omitted -->
. I gather that this is because by default the feature is disabled in goldmark. Therefore, I added the following to my config:
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
The resulting html is
<p style="text-align: center;">
test
*emphasized test*
</p>
Markdown is not processed (no new lines and no emphasized text). According to the shortcode documentation, using %
instead of <
as the shortcode symbol should process markdown. So I don’t know what I am doing wrong.
Any help is greatly appreciated! Thanks.