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

head.html « partials « layouts - github.com/kakawait/hugo-tranquilpeak-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1205e373d3fbc78e9367c9c2c08537e16310c4e5 (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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{{ $.Scratch.Set "isPost" false }}
{{ if .IsPage }}
  {{ if eq .Type "post" }}
    {{ $.Scratch.Set "isPost" true }}
  {{ end }}
{{ end }}
{{ if and (and ($.Scratch.Get "isPost") (lt .Site.Params.sidebarBehavior 3)) (or (and .Site.Params.clearReading (not .Params.clearReading)) .Params.clearReading) }}
  {{ .Scratch.Set "sidebarBehavior" (add .Site.Params.sidebarBehavior 3) }}
{{ else }}
  {{ .Scratch.Set "sidebarBehavior" .Site.Params.sidebarBehavior }}
{{ end }}
<!-- Fix hugo 0.17 expects ".Site.Author.gravatarEmail" whereas hugo 0.18 expects ".Site.Author.gravataremail" -->
{{ if .Site.Author.gravatarEmail }}
  {{ .Scratch.Set "gravatarEmail" .Site.Author.gravatarEmail }}
{{ end }}
{{ if .Site.Author.gravataremail }}
  {{ .Scratch.Set "gravatarEmail" .Site.Author.gravataremail }}
{{ end }}
{{ if .Scratch.Get "gravatarEmail" }}
  {{ .Scratch.Set "authorPicture" (printf "//www.gravatar.com/avatar/%s" (urlize (md5 (.Scratch.Get "gravatarEmail")))) }}
{{ else if .Site.Author.picture }}
  {{ .Scratch.Set "authorPicture" (absURL .Site.Author.picture) }}
{{ end }}
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
  <head>
    {{ partial "head_start.html" . }}
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="generator" content="Hugo {{ .Hugo.Version }} with theme Tranquilpeak 0.4.3-SNAPSHOT">
    <title>{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}</title>
    <meta name="author" content="{{ .Site.Author.name }}">
    <meta name="keywords" content="{{ with .Keywords }}{{ delimit . ", " }}{{ end }}{{ if .Site.Params.keywords }}, {{ delimit .Site.Params.keywords ", " }}{{ end }}">

    <link rel="icon" href="{{ with .Site.Params.favicon }}{{ . }}{{ else }}/favicon.png{{ end }}">
    {{ with .RSSLink }}
      <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ . }}">
    {{ end }}

    <!-- open graph data -->
    <meta name="description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}">
    <meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}">
    <meta property="og:type" content="blog">
    <meta property="og:title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}">
    <meta property="og:url" content="{{ .URL }}">
    <meta property="og:site_name" content="{{ .Site.Title }}">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:title" content="{{ .Site.Title }}">
    <meta name="twitter:description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}">
    {{ with .Site.Author.twitter }}
      <meta name="twitter:creator" content="@{{ . }}">
    {{ end }}
    {{ with .Site.Params.fbAppId }}
      <meta property="fb:app_id" content="{{ . }}">
    {{ end }}

    <!-- Facebook admins -->
    {{ with .Site.Params.fbAdminIds }}
      {{ range . }}
          <meta property="fb:admins" content="{{ . }}">
      {{ end }}
    {{ end }}

    {{ if .Scratch.Get "gravatarEmail" }}
      <meta property="og:image" content="//www.gravatar.com/avatar/{{ (md5 (.Scratch.Get "gravatarEmail")) | urlize }}?s=640">
    {{ else if .Site.Author.picture }}
      <meta property="og:image" content="{{ .Site.Author.picture | absURL }}">
    {{ end }}

    {{ with .Params.thumbnailImage }}
      <meta property="og:image" content="{{ . | absURL }}">
    {{ end }}
    {{ with .Params.coverImage }}
      <meta property="og:image" content="{{ . | absURL }}">
    {{ end }}
    {{ with .Params.gallery }}
      {{ range . }}
        <meta property="og:image" content="{{ range first 1 (split . " ") }}{{ . | absURL }}{{ end }}">
      {{ end }}
    {{ end }}

    {{ with .Site.Author.googlePlus }}
      <link rel="publisher" href="https://plus.google.com/{{ . | urlize }}">
    {{ end }}

    <!--EXTERNAL STYLES-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.min.css" integrity="sha256-vuXZ9LGmmwtjqFX1F+EKin1ThZMub58gKULUyf0qECk=" crossorigin="anonymous" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/helpers/jquery.fancybox-thumbs.min.css" integrity="sha256-SEa4XYAHihTcEP1f5gARTB2K26Uk8PsndQYHQC1f4jU=" crossorigin="anonymous" />
    <!--EXTERNAL STYLES END-->
    <!--STYLES-->
    <link rel="stylesheet" href="/css/style-jsjn0006wyhpyzivf6yceb31gvpjatbcs3qzjvlumobfnugccvobqwxnnaj8.min.css" />
    <!--STYLES END-->
    {{ range .Site.Params.customCSS }}
      {{ if isset . "href" }}
        <link {{ if not (isset . "rel") }}rel="stylesheet" {{ end }}{{ range $key, $value := . }} {{ if eq $key "href" }}{{ (printf "%s=\"%s\"" $key ($value | absURL)) | safeHTMLAttr }}{{ else }}{{ (printf "%s=\"%s\"" $key (string $value)) | safeHTMLAttr }}{{ end }}{{ end }}>
      {{ else }}
        <link rel="stylesheet" href="{{ . | absURL }}">
      {{ end }}
    {{ end }}

    {{ if .Params.ga.async }}
      {{ template "_internal/google_analytics_async.html" . }}
    {{ else }}
      {{ template "_internal/google_analytics.html" . }}
    {{ end }}
    {{ partial "head_end.html" . }}
  </head>