You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_resources.html had some macros that were used and assets_include at the top of it
_resources.css had some css that was needed by the macros
I observed that the content from _resources.css only made it into the page immediately after saving landing.html, presumably due to the process/server restart triggered by the file modification. On subsequent browser refreshes, the content was absent.
The text was updated successfully, but these errors were encountered:
The first time the import is referenced, Jinja will parse the target template file.
Our extension turns the assets_include on that first parse into a call block that will produce the expected content
After that first load, Jinja caches the import and doesn't parse it again. But, I think what Jinja caches is the original template, not the version where we've patched in a call block
Since it's cached at that point and not parsed again, we don't get to re-insert that call block and pull in the assets files
Not sure there's a clean way around this without coming up with a way to change how Jinja caches the import, or using a different approach to assets inclusion altogether.
My template
landing.html
started like:_resources.html
had some macros that were used andassets_include
at the top of it_resources.css
had some css that was needed by the macrosI observed that the content from
_resources.css
only made it into the page immediately after savinglanding.html
, presumably due to the process/server restart triggered by the file modification. On subsequent browser refreshes, the content was absent.The text was updated successfully, but these errors were encountered: