[FEAT] add cache busting via static_url_for and settings.cache_version (#1964)
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" ) }}` Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com> Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
This commit is contained in:
co-authored by
Vlad Stan
Pavol Rusnak
parent
fed2d41139
commit
4d1c4f6348
@@ -3,8 +3,21 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% for url in INCLUDED_CSS %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ url }}" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{ static_url_for('static', url ) }}"
|
||||
/>
|
||||
{% endfor %} {% block styles %}{% endblock %}
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url("{{ static_url_for('static', 'fonts/material-icons-v50.woff2') }}")
|
||||
format('woff2');
|
||||
}
|
||||
</style>
|
||||
<title>{% block title %}{{ SITE_TITLE }}{% endblock %}</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
@@ -289,7 +302,7 @@
|
||||
{% block vue_templates %}{% endblock %}
|
||||
<!---->
|
||||
{% for url in INCLUDED_JS %}
|
||||
<script src="{{ url }}"></script>
|
||||
<script src="{{ static_url_for('static', url) }}"></script>
|
||||
{% endfor %}
|
||||
<!---->
|
||||
<script type="text/javascript">
|
||||
|
||||
Reference in New Issue
Block a user