summaryrefslogtreecommitdiff
path: root/layouts/partials/head.html
blob: d289909e2589841d698a98d26a45fcf8d9edb2be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<head>
  <meta charset="utf-8" />
  {{ hugo.Generator }}

  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="author" content="{{ .Site.Author.name }}" />
  <meta property="og:url" content="{{ .Permalink }}" />
  <link rel="canonical" href="{{ .Permalink }}" />

  {{ partial "head/siteinfo" . }}
  {{ partial "head/css" . }}

  <!-- Umami Tracking -->
  <script>
    if (window.location.hostname !== 'localhost') {
      // track traffic
      const script = document.createElement('script');
      script.defer = true;
      script.src = 'https://umami.guhub.cn/script.js';
      script.dataset.websiteId = 'a84e25a7-ac03-4a1f-94b0-bd1f6ae44869';
      document.head.appendChild(script);
    }
  </script>

  <!-- Extra head -->
  {{ .Site.Params.extraHead | safeHTML }}
</head>