Skip to content

Allow markdown attribute lists to be used in render hooks #8270

@faraixyz

Description

@faraixyz

Hugo 0.81 introduced attribute lists on markdown blocks like lists, tables etc in which the element's attributes would be defined in curly braces. For example, you could use them for headings:

## Some Heading {.text-serif #a-heading title="Hovered"} 

This will render a heading like this:

<h2 class="text-serif" id="#a-heading" title="Hovered">Some Heading</h2>

There are also render hooks for some elements which let you modify how a link, heading or image is shown. Problem is that there is no way to use the attributes defined in the markdown attribute list inside a render hook.

It would be nice if there was a way to use the attributes defined in the attribute list in render hooks.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions