-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Create default link and image render hooks #11933
Comments
Just to be clear, when I do [markup.goldmark.renderhooks.link]
enable = false That toggle is just for the "default templates" not the "user provided" ... or both? |
Yeah, I get it. There's a couple of cases I didn't consider. Let me think about this for a bit. |
Here's my thought process on this... 1) With a multilingual single-host site where
Note the default hooks will always be overridden by user-provided hooks if present (in the same way that any of the built-in templates are overridden, including the built-in GoAT hook). 2) Is there ever a time, with any type of site, that you would want the default render hooks to override user-provided hooks? No. 3) Do we need or want a flag to disable both default and user-provided hooks? No. We don't have a flag like that for heading or code block hooks. So, what about?
We wouldn't need the |
Since detecting a [markup.goldmark.renderhooks.image]
disableDefault = true <-- hardcoded to false per criteria above. |
Sounds good to me. |
These are no longer necessary due to the built-in link and image render hooks that are automatically enabled when: - Site is multilingual, and - Site is single-host, and - markup.goldmark.duplicateResourceFiles = false See: - <gohugoio/hugo#11933> - <gohugoio/hugo#11945>
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. |
With the implementation of #11453 and #11904 we no longer duplicate page resources per language1. This is applicable to multilingual, single-host sites.
When resources are not duplicated per language (the default), link and image render hooks are required to properly resolve markdown destinations (links and image).
Per this discussion, the site config would be:
Candidate render hooks:
layouts/_default/_markup/render-image.html
layouts/_default/_markup/render-link.html
Test site:
Footnotes
This can be disabled by setting
markup.goldmark.duplicateResourceFiles = true
in site configuration. ↩The text was updated successfully, but these errors were encountered: