Skip to content

Commit

Permalink
add last_modified_at meta for http refresh cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhgChgLiBot committed Nov 24, 2024
1 parent 3e16491 commit 1b19ce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions scaffold.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
settings["footer"] = Liquid::Template.parse(settings["footer"]).render(settings)
settings["tagline"] = Liquid::Template.parse(settings["tagline"]).render(settings)
settings["name"] = Liquid::Template.parse(settings["name"]).render(settings)
settings["last_modified_at"] = Time.now.strftime("%Y-%m-%dT%H:%M:%S%z")

# Parse the Liquid template
liquid_template = Liquid::Template.parse(template_content)
Expand Down
3 changes: 2 additions & 1 deletion themes/default/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ title }}</title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="last-modified" content="{{ last_modified_at }}">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e">
<meta name="apple-mobile-web-app-capable" content="yes">
Expand Down

0 comments on commit 1b19ce1

Please sign in to comment.