Help with markdown attributes

markdown

Some paragraph.
{.center}

I’ve tried this, but with the default settings, it doesn’t seem to work. No class="center" appears on the p (or any other) element. The markdown converter just takes it as normal text.

In your site configuration:

[markup.goldmark.parser.attribute]
block = true # default is false

More info:
https://discourse.gohugo.io/t/markdown-attributes/41783

Yes, this does NOT work for me in the theme configuration. Can anyone check this?

@ju52 See https://gohugo.io/getting-started/configuration/#merge-configuration-from-themes

markup:
_merge: none

Allowing themes to override markup configuration would be really irritating, and there are security implications as well.

1 Like

Thanks, missed this

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.