summaryrefslogtreecommitdiffstats
path: root/layouts/partials/head.html
blob: ba8897021afd1d6b4d89066c1dc0e50d5980228f (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
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<!-- SEO -->
<title>{{ if .IsPage }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}" />{{ end }}
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}" />{{ end }}
<meta name="robots" content="index, follow" />
<meta name="referrer" content="always" />

<!-- Social & Open Graph -->
<meta property="og:title" content="{{ if .IsPage }}{{ .Title }} - {{ end }}{{ .Site.Title }}" />
{{ with .Site.Params.description }}<meta property="og:description" content="{{ . }}" />{{ end }}
<meta property="og:url" content="{{ .Site.BaseURL }}" />
{{ with .Site.Params.shareImage }}
<meta property="og:image" content="{{ . | absURL }}" />
<meta name="twitter:card" content="summary_large_image" />
{{ end }}
{{ with .Site.Params.twitterHandle }}<meta name="twitter:site" content="@{{ . }}" />{{ end }}

<!-- Favicon -->
{{ with .Site.Params.favicon }}<link rel="icon" href="{{ . | absURL }}" />{{ end }}

<!-- Styles -->
<link rel="stylesheet" href="{{ "assets/css/split.css" | absURL }}" type="text/css" media="screen" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
{{ if .Site.Params.custom.css.enable }}
<link rel="stylesheet" href="{{ "css/style.css" | absURL }}" type="text/css" media="screen" />
{{ end }}

<!-- Image Styles -->
{{ if .Site.Params.visual.image.enable }}
  <style>
  {{ if .Site.Params.visual.image.file }}
    .fs-split .split-image { background-image: url("{{ .Site.Params.visual.image.file | absURL }}"); background-position: {{ if .Site.Params.visual.image.position }}{{ .Site.Params.visual.image.position }}{{ else }}center center{{ end }}; }
  {{ end }}
  </style>
{{ end }}

<!-- Google Analytics -->
{{ if and (.Site.GoogleAnalytics) (not (in (printf "%#v" .Site.BaseURL) "localhost")) }}
  {{ template "_internal/google_analytics.html" . }}
{{ end }}