Skip to content

Commit

Permalink
feat(html): append git commit hash to JS file
Browse files Browse the repository at this point in the history
Explanation and reasoning in 013876d.
  • Loading branch information
vednoc committed Jun 27, 2021
1 parent bc9820d commit 920ad65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions views/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{{ $title := "UserStyles.world" }}
{{ $commit := printf "%.8s" GitCommit }}
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="title" content="{{ $title }}">
<meta name="color-scheme" content="dark light">
<meta name="description" content="A new site to explore userstyles.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="https://userstyles.world">
<link rel="stylesheet" href="/css/main.css?v={{ printf "%.8s" GitCommit }}s" type="text/css" media="screen">
<link rel="stylesheet" href="/css/main.css?v={{ $commit }}" type="text/css" media="screen">
<link rel="mask-icon" href="/mascot.svg" color="blue">
<link rel="icon" href="/favicon.ico">
<title>{{ .Title }} — {{ $title }}</title>
Expand All @@ -17,4 +18,4 @@
<meta property="og:description" content="{{ .Style.Description }}" />
<meta property="og:image" content="{{ .Style.Preview }}" />
{{ end }}
<script src="/js/main.js"></script>
<script src="/js/main.js?v={{ $commit }}"></script>

0 comments on commit 920ad65

Please sign in to comment.