Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support render hooks for specific templates only #7349

Closed
Brixy opened this issue Jun 2, 2020 · 3 comments · Fixed by #7350
Closed

Support render hooks for specific templates only #7349

Brixy opened this issue Jun 2, 2020 · 3 comments · Fixed by #7350

Comments

@Brixy
Copy link

Brixy commented Jun 2, 2020

Renderhooks are a great addition, and I think it does make sense to use image and link render hooks globally.

Yet, it may make sense to use heading render hooks occasionally—e.g. for blogs articles or other sections only.

would it be possible and make sense to enable a folder hierarchy like this:

layouts/blog/_markup/render-heading.html

Thank you!

@Brixy Brixy added the Proposal label Jun 2, 2020
@bep bep added Enhancement and removed Proposal labels Jun 2, 2020
@bep bep modified the milestones: v0.72, v0.73 Jun 2, 2020
@bep
Copy link
Member

bep commented Jun 2, 2020

I agree, and I had it orignally implemented to follow mostly the same lookup rules as, say, single.html, but I restricted it the last moment after a comment from @regisphilibert. But there obviously is a need to have different set of hooks for blog vs docs etc.

@regisphilibert
Copy link
Member

regisphilibert commented Jun 2, 2020

🤔 don't recall which comment... In any case I fully support having render hooks applied to certain types of content, and using the directory structure for that is a UX every Hugo user is familiar with.

bep added a commit to bep/hugo that referenced this issue Jun 2, 2020
bep added a commit to bep/hugo that referenced this issue Jun 2, 2020
@bep bep closed this as completed in #7350 Jun 2, 2020
bep added a commit that referenced this issue Jun 2, 2020
@github-actions
Copy link

github-actions bot commented Feb 2, 2022

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 Feb 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants