aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/base-head.html
blob: 53d1fbcceeca1786a94ed0d7fffc26fb2be2eb8d (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{{- partial "generate-authors" . -}}

{{-
  $authorData := (dict
    "Context" .
    "AuthorDefaultUser" .Site.Author.default.home
  )
-}}

{{- $author := partial "function-authors-data.html" (dict "Data" $authorData) -}}

<!-- HTML Meta Tags -->
<meta charset="utf-8" />
<meta name="author" content="{{ $author.name -}}" />
{{ if or .Params.Feed .Params.Unlisted .Params.ExpiryDate -}}
<meta name="robots" content="noindex,nofollow" />
{{- else -}}
<meta name="robots" content="{{ or .Site.Params.site.robots "index,follow" }}" />
{{- end }}
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="keywords" content="{{- partial "base-title.html" . -}}" />
<meta name="generator" content="Hugo {{ hugo.Version }}" />
{{ with .Site.Params.site.refresh -}}
<meta http-equiv="refresh" content="{{ . }}" />
{{- end }}

<!-- Search Engine Tags -->
<meta itemprop="name" content="{{ partial "base-title.html" . -}}" />
<meta itemprop="description" content="{{ if .Params.summary }}{{ .Params.summary }}{{ else }}{{ .Summary }}{{ end }}" />
<meta itemprop="image" content="{{ .Site.BaseURL }}/{{ $author.user -}}/media/profile/picture.png" />

<!-- Open Graph Meta Tags -->
<meta property="og:title" content="{{ partial "base-title.html" . -}}" />
<meta property="og:description" content="{{- partial "base-description.html" . -}}" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:image" content="{{ .Site.BaseURL }}/{{ $author.user -}}/media/profile/picture.png" />
<meta property="og:type" content="website" />
<meta property="article:published_time" content="{{ .Params.PublishDate }}" />
<meta property="article:modified_time " content="{{ .Params.LastMod }}" />

<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="{{ partial "base-title.html" . -}}" />
<meta name="twitter:description" content="{{- partial "base-description.html" . -}}" />
<meta name="twitter:image" content="{{ .Site.BaseURL }}/{{ $author.user -}}/media/profile/picture.png" />

<!-- Search Verification -->
{{- partial "base-search.html" . -}}

<!-- Link Tags -->
<link rel="home" href="{{ .Site.BaseURL }}/{{ $author.user }}/" />

<!-- Feed Discovery -->
{{- partial "base-discovery.html" . -}}

<!-- Canonicalization -->
{{- partial "base-canonical.html" . -}}

<!-- Style Sheets & Scripts -->
{{- $index   := resources.Get "js/index.js" -}}
{{- $default := resources.Get "css/default.css" -}}
{{- $syntax  := resources.Get "css/syntax-highlight-default.css" -}}
{{- $js      := $index | resources.Minify | fingerprint -}}
{{- $css     := slice $default $syntax | resources.Concat "css/bundle.css" | resources.Minify | fingerprint -}}

{{ if .Site.Params.site.production }}
<link title ="Default" rel="stylesheet" href="{{ $css.Permalink }}" />
<script src="{{ $js.Permalink }}"></script>
{{ else }}
<link title="Default" rel="stylesheet" href="{{ $default.Permalink }}" />
<link rel="stylesheet" href="{{ $syntax.Permalink }}" />
<script src="{{ $index.Permalink }}"></script>
{{ end }}

<!-- Progressive Enhancement -->
{{- partial "base-manifest.html" . -}}

<!-- Content Security Policy -->
{{- partial "base-csp.html" . -}}

<!-- No Scripts  -->
<noscript>
  <style>
    {{ safeCSS (readFile "assets/css/noscript.css") }}
  </style>
</noscript>