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

WIP: Allow markdown attribute lists to be used in render hooks #8271

Merged
merged 1 commit into from
Feb 23, 2021

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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
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