Welcome to mirror list, hosted at ThFree Co, Russian Federation.

head.html « partials « layouts - github.com/monkeyWzr/hugo-theme-cactus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fe2f63b2992dd9e5c2db37b755f68ff978d3174f (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
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{{ if .IsPage }} {{ .Title }} | {{ end }}{{ .Site.Title }}</title>
  <link rel = 'canonical' href = '{{ .Permalink }}'>
  {{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="robots" content="all,follow">
  <meta name="googlebot" content="index,follow,snippet,archive">
  {{ template "_internal/opengraph.html" . }}
  {{ template "_internal/twitter_cards.html" . }}
  {{ .Scratch.Set "colortheme" "white"}}
  {{ if .Site.Params.Colortheme }}
    {{ .Scratch.Set "colortheme" .Site.Params.Colortheme }}
  {{ end }}
  {{ $colortheme := .Scratch.Get "colortheme" }}

  {{- $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") -}}
  {{- $styles := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "scss/style.scss" . | resources.ToCSS $options | resources.Fingerprint "sha512" }}
  <link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}"> 

  <!-- Custom CSS -->
  {{ range .Site.Params.css }} <link rel="stylesheet" href="{{ . | absURL }}"> {{ end }}
  {{ `
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  ` | safeHTML }}

  {{ partial "favicon.html" . }}
  {{ if .Site.Params.rss }}
  {{ with .OutputFormats.Get "RSS" }}
    {{ printf `<link href="%s" rel="%s" type="%s" title="%s" />` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML }}
  {{ end }}
  {{ end }}
  {{ if .Site.GoogleAnalytics }}
  {{ if .Site.Params.googleAnalyticsAsync }}
    {{ template "_internal/google_analytics_async.html" . }}
  {{ else }}
    {{ template "_internal/google_analytics.html" . }}
  {{ end }}
  {{ end }}
</head>