-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Shortcodes are not reloading when inner resources are changed #6177
Comments
This is a known current limitation (I think there is a similar issue floating around). But it isn't easily solved. So what I suggest you do in the meantime is something ala:
|
Thanks for your reply! Unfortunately that does not work for me. It still didn't rebuild the shortcode, when I rebuilt the |
I don't see why it would need to rebuild the shortcode when it's not changing anything, but good you found a way. |
Is this the same limitation with data from the data folder? |
I'm also running into this. I have dynamically generated png's and when the data.json file updates, Hugo reloads the page but doesn't reload the data from the json file. @bep What about this is hard to implement? I may help give us a better understanding of how to "fix" it. |
I'm pretty sure this one should be fixed by now. |
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. |
I have a shortcode to show HTML code examples, both rendered by the browser and the actual code. To keep the examples working properly, I place them and their styles inside a shadow DOM, so the browser ignores the global styles.
This is done by requesting the stylesheet (built in a process parallel to the hugo serve process) as a resource and then passing the link to a javascript that then places it in the shadow dom on creation.
It looks something like this:
The problem now is, that when the
main.min.css
file changes, the shortcode using it, is not rebuilt. So I don't see updated styles in my content pages that contain the HTML code examples.My assumption now is, that the shortcode is not rebuilt, because it does not see the resource as a dependency. Because if I touch the shortcode file, then hugo rebuilds it and the updated css file will be loaded.
The text was updated successfully, but these errors were encountered: