New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] add cache busting via static_url_for and settings.cache_version #1964
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1964 +/- ##
==========================================
+ Coverage 60.60% 60.63% +0.03%
==========================================
Files 55 55
Lines 8318 8325 +7
==========================================
+ Hits 5041 5048 +7
Misses 3277 3277
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi @prusnak, I added you as I was concerned this may impact nix stuff. We originally stopping static file building as nix didnt like lnbits changing its own code |
074b9d2
to
a10a58a
Compare
its created a |
the change does not change any code, it just creates new files - which is a good point to address for nix
this location shouldn't be used because on nix this would be read-only, maybe we should generate the files not into |
I am wondering whether we shouldn't just introduce |
yep, seems reasonable aswell, ill have another try |
500ac14
to
acaeeb7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested this, but I do like this approach much more than introducing fastapi-static-digest dependency.
untested ACK
207ed1f
to
2baae18
Compare
closes #1954 this PR add cache busting to `/static` additionally i combined `lnbits/core/static` with `lnbits/static`, it was not necessary and added a lot of duplicate code for cache busting now you have to include all static files inside the html files with `{{ static_url_for("static", "app.css" ) }}` bundle mypy compile first then serve revert static-digest package bundle revert
- "/static/vendor/moment.js",
- "/static/vendor/underscore.js",
...
+ "vendor/moment.js",
+ "vendor/underscore.js",
...
|
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
closes #1954
this PR add cache busting to
/static
additionally i combined
lnbits/core/static
withlnbits/static
, it was not necessary and added a lot of duplicate code for cache busting now you have to include all static files inside the html files with{{ static_url_for('static', 'app.css' ) }}