Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
faraixyz opened this issue Feb 22, 2021 · 1 comment · Fixed by #8271
Closed

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

faraixyz opened this issue Feb 22, 2021 · 1 comment · Fixed by #8271
Assignees
Milestone

Comments

@faraixyz
Copy link

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.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 23, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants