summaryrefslogtreecommitdiffstats
path: root/layouts/partials/head.html
blob: e77e902afd8bccff240b91f0052fd3b4190c32a0 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,shrink-to-fit=no">

    <link rel="canonical" href="{{ .Permalink }}">

    <title>{{ block "title" . }}{{- partial "title.html" . -}}{{ end }}</title>
    <meta name="description" content="{{ partial "description.html" . }}">
    <meta name="keywords" content="{{ delimit (partial "keywords.html" .) ", " }}">

    <meta name="author" content="{{ partial "author.html" . }}">
    {{ hugo.Generator }}

    {{ partial "styles.html" . }}
    {{ partial "data.html" . }}
    {{ block "custom-scripts" . }}{{ partial "custom-scripts.html" . }}{{ end }}

    {{- /* Favicons */}}
    <link rel="icon" href="{{ site.Params.assets.favicon | default "favicon.ico" | relURL }}" sizes="any"><!-- 32×32 -->
    <link rel="icon" href="{{ site.Params.assets.svgicon | default "icon.svg" | relURL }}" type="image/svg+xml">
    <link rel="apple-touch-icon" href="{{ site.Params.assets.apple_touch_icon | default "apple-touch-icon.png" | relURL }}"><!-- 180×180 -->

    {{- /* Feed, sitemap and manifest */}}
    {{ partial "alternate-outputs.html" . }}

    {{- range .AllTranslations -}}
    <link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}">
    {{ end -}}

    <meta name="theme-color" content="#ffffff">
    {{ block "custom-head" . }}{{ partial "custom-head.html" . }}{{ end }}

    {{ with site.GoogleAnalytics }}
        {{ $ga := resources.Get "js/ga.js" | minify | fingerprint }}
        {{ if not site.Params.assets.disable_fingerprinting }}
            {{ $ga = $ga | fingerprint }}
            <script src="{{ $ga.Permalink }}" integrity="{{ $ga.Data.Integrity }}"></script>
        {{ else }}
            <script src="{{ $ga.Permalink }}"></script>
        {{ end }}
    {{ end }}

    {{- /* Misc */}}
    {{ template "partials/templates/opengraph.html" . }}
    {{ template "partials/templates/twitter_cards.html" . }}
    {{ template "partials/templates/schema_json.html" . }}
</head>