feat: add dynamic timestamp to CSS cache-busting
All checks were successful
Build and Deploy Static Site / build (push) Successful in 1m2s
All checks were successful
Build and Deploy Static Site / build (push) Successful in 1m2s
Included a timestamp in the static site generation to dynamically append to the CSS file version parameter. This ensures that users always get the latest CSS changes, reducing cache-related issues.
This commit is contained in:
parent
009ab87552
commit
9e8b54083a
2 changed files with 5 additions and 2 deletions
5
main.py
5
main.py
|
@ -64,7 +64,10 @@ def render_template_to_file(template_name, output_name, **kwargs):
|
|||
|
||||
def generate_static_site(development_mode=False):
|
||||
# Common context
|
||||
kwargs = {}
|
||||
kwargs = {
|
||||
"timestamp": int(datetime.datetime.now().timestamp()),
|
||||
}
|
||||
|
||||
if development_mode:
|
||||
kwargs.update(
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue