summaryrefslogtreecommitdiffstats
path: root/layouts/partials/head.html
blob: 5c76d9f2d79fd36eba7d6153a36d20f7c8673ab4 (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
{{/* */}}
<head prefix="og: http://ogp.me/ns#; dc: http://purl.org/dc/terms/#">
    {{- $description := print .Params.Description -}}
    {{- if or .IsHome (eq .Params.Description "") (not .Params.Description) -}}
        {{ $description = .Site.Params.Description }}
    {{- end -}}

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,shrink-to-fit=no">

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

    <title>{{ block "title" . }}{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ .Site.Title }}{{ end }}{{ end }}</title>
    <meta name="description" content="{{ $description }}">
    <meta name="author" content="{{ (partial "author.html" . ) }}">
    {{ hugo.Generator }}

    <!-- Dublin Core metadata for Zotero -->
    <meta property="dc:title" content="{{ .Title }}">
    <meta property="dc:creator" content="{{ (partial "author.html" . ) }}">
    <meta property="dc:identifier" content="{{ .Permalink }}">
    {{- if .Params.editor }}<meta property="dc:contributor" content="{{ .Params.editor }}">{{ end }}
    {{- if .Params.date }}<meta property="dc:date" content="{{ .Params.date }}">{{ end }}
    {{- if .Params.rights }}<meta property="dc:rights" content="{{ .Params.rights }}">{{ end }}
    <meta property="dc:source" content="{{ if .Params.source }}{{ .Params.source }}{{ else }}{{ .Site.Title }}{{ end }}">

    {{- /* Misc */}}
    {{template "partials/templates/opengraph.html" . }}

    {{ partial "styles.html" . -}}
    {{ partial "scripts.html" . -}}

    <link rel="apple-touch-icon-precomposed" sizes="180x180" href="{{ "apple-touch-icon-precomposed.png" | relURL }}">
    <link rel="shortcut icon" href="{{ "favicon.ico" | relURL }}">

    <!-- RSS -->
    {{- with .OutputFormats.Get "rss" }}
    {{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
    {{- end }}
</head>