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
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
Add a link
Reference in a new issue