include unix ts template var for asset bust
All checks were successful
/ build (push) Successful in 7s
All checks were successful
/ build (push) Successful in 7s
This commit is contained in:
parent
f943ac62c9
commit
7b13fa794e
2 changed files with 5 additions and 2 deletions
|
@ -5,8 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>cfebs.com${more_title}</title>
|
||||
<link rel="icon" type="image/png" href="/avatar.png">
|
||||
<link rel="stylesheet" href="/style.css?v=2">
|
||||
<link rel="stylesheet" href="/chalk.min.css">
|
||||
<link rel="stylesheet" href="/style.css?v=${_now}">
|
||||
<link rel="stylesheet" href="/chalk.min.css?v=${_now}">
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
|
3
main.py
3
main.py
|
@ -92,6 +92,9 @@ def render_template(tpl_fname, out_fname, subs):
|
|||
with open(tpl_fname, "r", encoding="utf-8") as inf:
|
||||
tmpl = Template(inf.read())
|
||||
|
||||
# include in every template
|
||||
subs["_now"] = int(datetime.datetime.now().timestamp())
|
||||
|
||||
out = tmpl.substitute(subs)
|
||||
|
||||
out_fname = os.path.join("public/", out_fname)
|
||||
|
|
Loading…
Add table
Reference in a new issue