Description
I am wondering if jekyll-asset-pipeline should name files based on the hash of output content, rather than the hash of pipeline parameters. This would ensure that cachebusting always works even if the asset converter is not hermetic. (This cachebusting strategy is also used by webpack.)
Currently the hash is computed by this code:
jekyll-asset-pipeline/lib/jekyll_asset_pipeline/pipeline.rb
Lines 13 to 15 in 35c9982
A non-hermetic build example is compiling a SASS file that imports partials. If I have these two files:
colors.scss (not known to jekyll-asset-pipeline)
$my-color: blue;
main.scss (included in some pipeline)
@use "colors";
.foo {
color: $my-color;
}
modifying colors.scss
results in jekyll-assets-pipeline generating a file with the same hash, despite affecting the content of the output css.
I could prepare a PR if there is interest in changing the hash behavior. Thanks!