-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathhead.html
36 lines (35 loc) · 2.03 KB
/
head.html
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
29
30
31
32
33
34
35
36
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
{{ hugo.Generator }}
<title>{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}</title>
{{- if hasPrefix .Permalink "http" }}<link rel="canonical" href="{{ .Permalink }}" />{{ end }}
<link rel="alternate icon" type="image/png" href="{{ "favicon.png" | relURL }}">
<link rel="icon" type="image/svg+xml" href="{{ "favicon.svg" | relURL }}">
{{- $style := resources.Get "css/theme.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous">
{{- if .Site.Params.search.enabled -}}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3" />
{{- end }}
{{- $scratch := newScratch }}
{{- $scratch.Set "description" (or .Description (.Param "description")) }}
{{- $scratch.Set "keywords" (delimit (or .Keywords (.Param "keywords")) ",") }}
<meta name="description" content="{{ $scratch.Get "description" }}">
<meta name="keywords" content="{{ $scratch.Get "keywords" }}">
<meta itemprop="name" content="{{ .Title }}">
<meta itemprop="description" content="{{ $scratch.Get "description" }}">
<meta itemprop="keywords" content="{{ $scratch.Get "keywords" }}">
<meta property="og:title" content="{{ .Title }}">
{{- with .Site.Params.title }}
<meta property="og:site_name" content="{{ . }}">
{{- end }}
<meta property="og:description" content="{{ $scratch.Get "description" }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:image" content="{{ "docs-thumbnail.png" | relURL }}"/>
<meta name="twitter:title" content="{{ .Title }}" />
<meta name="twitter:description" content="{{ $scratch.Get "description" }}" />
<meta name="twitter:card" content="summary" />
{{ partial "gtm_head.html" . }}
<link rel="stylesheet" href="https://ttui.thethingsindustries.com/release/1.9.4/main.css" />
</head>