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:
<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.
I haven’t tried this in a shortcode, but I have done something similar using HTML div tag wrapping around Markdown and using the Goldmark-version Hugo… Try putting a blank line above and below the Markdown you are trying to wrap, and may be use div tag instead of p tag.
I think after the unsafe setting was turned off by default, your best bet is to create a shortcode that gets called as something that gets a raw string ({{<) and use markdownify within. So the shortcode would look like this: