Skip to content

Conversation

bep
Copy link
Member

@bep bep commented Feb 22, 2021

Fixes #8270

@bep bep force-pushed the feat/attributes-render-hooks branch 2 times, most recently from 8086562 to 434eec0 Compare February 23, 2021 09:53
@bep
Copy link
Member Author

bep commented Feb 23, 2021

/cc @faraixyz re. attributes and hooks. Two comments re this:
`

  1. I have only added it to the heading hooks context. I don't see how links/images can ever receive attributes ...?
  2. I have added as a map, which I think make sense, so you can do {{ .Attributes.class }} etc.

@faraixyz
Copy link

This is neat, thanks for working on this.

  1. I guess headings makes sense for now. Ignoring links, headings and images, do the markdown attributes work on inline elements, or is it just for blocks?
  2. That makes sense.

@bep
Copy link
Member Author

bep commented Feb 23, 2021

, do the markdown attributes work on inline elements,

Blocks AND headings (which excludes links and images).

@bep bep force-pushed the feat/attributes-render-hooks branch from 434eec0 to b3a8f83 Compare February 23, 2021 17:08
@bep bep merged commit cd0c5d7 into gohugoio:master Feb 23, 2021
@github-actions
Copy link

This pull request 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 Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow markdown attribute lists to be used in render hooks
2 participants