Description
Recently, we started adding a hash (fingerprint) to the index.css and index.js filenames:
This is useful (good practice, and actually also solved an issue we had in pandas with cached assets on the server when releasing a new version), but, makes the development process also more inconvenient ..
Because now each time you make a change in the css/js source code, and the static assets thus get recompiled, the filename of pydata_sphinx_theme/static/css/index.[hash].css
changes. That means that you need to "git remove" the old file (which is automatically deleted on the filesystem, but you still need to tell git this is OK) and "git add" the new each time you want to commit those changes.
So I am wondering if we can make this workflow a bit smoother. Some ideas:
- I suppose the hash is currently based on the full
src/
content. But I was wondering: would it be possible to let this hash be defined on the package version number? That would still ensure that for people using released versions they always get a different hash when updating the pydata-sphinx-theme version, and only people relying directly on master might need to be careful about caching of old assets.
From a quick google, this doesn't seem to be an option with webpack. - Alternatively, it might be possible to let
yarn build:production/dev
do the git rm / git add itself?
Or do you have other experience with how to deal with such workflow?