With Goldmark, I’m able to add classes to my headings via Markdown like so:
## Brave Browser{.text-center}
Is there a way that I can access that class via the context passed down to the render-heading hook? I’m not seeing any way in the docs, however I’m hoping that there’s some undocumented means of doing so.
Currently Hugo does output the class attribute from a markdown heading in the generated HTML.
In my comment above what I really meant was that I am not aware whether the markdown heading class attribute can be read from a render-heading hook template.
Here is my way of hacking around this limitation for now. I only needed classes so made it simple. Conceivably this could be expanded on to support the full range of ids, classes, and attributes values.