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
This is busting assets just fine, but I can't get it to update the references to the new busted urls.
My jekyll static site project:
project root
|___ [various files and folders for project]
|___ "_staging/" //<- dir where complete site is after build, minifying, etc
| |___ assets/
| | |___ js/
| | |___ images/
| | |___ css/
| |____ [various html and other files and folders for site]
|___ "_public/" // <- dir I'd ideally like complete cache busted site ready for upload
At the moment I am just trying to bust successfully in situ in _staging/ and not outputing to sibling _public directory.
As above, this is cache busting all the files in the assets directory at root/_staging/assets/ just fine, and such that they all have md5 fingerprints and non-busted assets are deleted.
However, the references to the assets (in html, sw.js etc) are not being changed.
For example, in the processed home page index.html here (root/_staging/index.html):
project root
|
|___ "_staging/" //<- dir where complete site is after build, minifying, etc
| |___ index.html
...
It won't work with absolute URLs like https://www.mysite.org/assets/css/main.css.
To make plugin recognize files, the paths to the files must match. In this case, https://www.mysite.org/assets/css/main.css seems to it like a completely different asset. It can't know, that https://www.mysite.org/assets/css/main.css and /assets/css/main.css are same files.
Just as a side note, there is no reason to use absolute paths for assets, unless some special cases (like URLs for structured data formats). Just use root-relative paths like /assets/css/main.css and let server resolve domain.
Oh crap, you're right. It looks for strings enclosed by particular character sets.
Weird that this limitation was not warned of in README or, alternatively, that an option made to allow setting a basepath - which would have resolved this.
But thanks - I'll think about what to do from here.
I am seeking help to configure properly.
This is busting assets just fine, but I can't get it to update the references to the new busted urls.
My jekyll static site project:
At the moment I am just trying to bust successfully in situ in
_staging/
and not outputing to sibling_public
directory.The task in my gruntfile is:
As above, this is cache busting all the files in the assets directory at
root/_staging/assets/
just fine, and such that they all have md5 fingerprints and non-busted assets are deleted.However, the references to the assets (in html, sw.js etc) are not being changed.
For example, in the processed home page index.html here (
root/_staging/index.html
):...the reference to the style sheet is still:
<link rel="stylesheet" href="https://www.mysite.org/assets/css/main.css">
instead of desired:
<link rel="stylesheet" href="https://www.mysite.org/assets/css/main.4709430bf780d8b5.css">
Could someone help me to configure this properly to get references to change?
Thank you for any help in advance.
The text was updated successfully, but these errors were encountered: