head.html (3983B)


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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="
            {{- if .IsHome -}} {{- $.Site.Params.Subtitle -}}
      {{- else if .Description -}}
            {{- .Description | markdownify | plainify -}}
      {{- else -}}
            {{- .Summary | markdownify | plainify -}}
      {{- end -}}" />
<meta name="keywords" content="
            {{- with .Params.Keywords -}}
            {{- delimit . ", " -}}
      {{- else -}}
      {{- $.Site.Params.Keywords -}}
      {{- end -}}" />
{{ if .Params.noindex -}}
  {{- if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") -}}
    <meta name="robots" content="noindex" /> 
  {{- end -}}
{{- else -}}
  <meta name="robots" content="index, follow" />
{{- end }}
<link rel="canonical" href="{{ .Permalink }}" />

{{ template "_internal/google_analytics.html" . }}

{{ $css := resources.Get "css/style.css" }}
{{ $options := (dict
  "targetPath" "styles.css"
  "minify" true
  "sourceMap" "linked"
) }}
{{ $styles := $css | css.Build $options }}

<link rel="stylesheet" href="{{ $styles.Permalink }}">

<!-- Custom CSS to override theme properties (/static/style.css) -->
{{ if (fileExists "static/style.css") -}}
  <link rel="stylesheet" href="{{ "style.css" | absURL }}">
{{- end }}

<!-- Custom CSS to override theme properties (/static/style.css) -->
{{- if (fileExists "static/style.css") -}}
  <link rel="stylesheet" href="{{ "style.css" | absURL }}">
{{- end -}}

<!-- Icons -->
{{- if isset $.Site.Params "favicon" -}}
  <link rel="shortcut icon" href="{{ $.Site.Params.favicon | absURL }}">
{{- else -}}
  <link rel="shortcut icon" href="{{ printf "img/theme-colors/%s.png" (or .Params.color $.Site.Params.ThemeColor | default "orange") | absURL }}">
  <link rel="apple-touch-icon" href="{{ printf "img/theme-colors/%s.png" (or .Params.color $.Site.Params.ThemeColor | default "orange") | absURL }}">
{{- end }}
<!-- OG data -->
<meta property="og:locale" content="{{ $.Site.Language.Lang }}"/>
<meta property="og:type" content="
                {{- if .IsPage -}}
                  article
                {{- else -}}
                  website
                {{- end }}"/>
<meta property="og:title" content="
                {{- if .IsHome -}}
                {{- $.Site.Title -}}
                {{- else -}}
                {{- .Title -}}
                {{- end }}"/>
<meta property="og:description" content="
                {{- if .IsHome -}}
                {{- $.Site.Params.Subtitle -}}
{{- else if .Description -}}
                {{- .Description | markdownify | plainify -}}
{{- else -}}
                {{- .Summary | markdownify | plainify -}}
{{- end }}"/>
<meta property="og:url" content="{{ .Permalink }}"/>
<meta property="og:site_name" content="{{ .Site.Title }}"/>
<meta property="og:image" content= {{- with (.Params.cover | .Resources.GetMatch) -}}
      "{{ .RelPermalink | absURL }}"
{{- else -}}
      {{- if .Site.Params.favicon -}}
        "{{ .Site.Params.favicon | absURL }}"
      {{- else -}}
        "{{ printf "img/theme-colors/%s.png" .Site.Params.ThemeColor | absURL }}"
      {{- end -}}
{{ end -}}/>
<meta property="og:image:width" content="1200"/>
<meta property="og:image:height" content="627"/>
{{ range .Params.categories -}}
  <meta property="article:section" content="{{ . }}"/>
{{- end }}
{{ if isset .Params "date" -}}
  <meta property="article:published_time" content="{{ time .Date }}"/>
{{- end -}}

<!-- RSS -->
{{ with .OutputFormats.Get "RSS" -}}
  <link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}"/>
{{- end }}

<!-- JSON Feed -->
{{ with .OutputFormats.Get "json" -}}
  <link href="{{ .RelPermalink }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}"/>
{{- end }}

{{- partial "ld_schema" . -}}

<!-- Extended head section-->
{{- partial "extended_head.html" . -}}