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
get_url(path="assets/js/main.js", cachebust=true) should work in a theme, since cachebust=false works.
Current Behavior
An error when running zola build occurs:
Failed to build the site
Error: Failed to render page '/home/user/Documents/blogs/blog/content/post.md'
Reason: Failed to render 'page.html': error while rendering macro `footer::script` (error happened in a parent template)
Reason: Function call 'get_url' failed
Reason: file `assets/js/main.js` not found; searched in /home/user/Documents/blogs/blog/static /home/user/Documents/blogs/blog/public /home/user/Documents/blogs/blog/content
It looks like get_url is not searching inside the theme's directory.
Alternatively, a theme that loads JS from a similar directory should suffice for testing the error with cachebust=true
The text was updated successfully, but these errors were encountered:
adworacz
changed the title
Cachebusting breaks get_url path lookup for JS asset
Cachebusting breaks get_url path lookup for JS asset in theme
Mar 20, 2021
adworacz
added a commit
to adworacz/zerm
that referenced
this issue
Mar 20, 2021
Bug Report
Environment
Zola version: 0.13.0
Expected Behavior
get_url(path="assets/js/main.js", cachebust=true)
should work in a theme, sincecachebust=false
works.Current Behavior
An error when running
zola build
occurs:It looks like
get_url
is not searching inside the theme's directory.Step to reproduce
Utilize this commit/branch from the zerm theme: adworacz/zerm@caa3d04
Alternatively, a theme that loads JS from a similar directory should suffice for testing the error with
cachebust=true
The text was updated successfully, but these errors were encountered: