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

head.html « partials « layouts - github.com/leonardofaria/bento.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fef91e610c4e5be1c9367968c302c3433bf1118a (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<head itemscope itemtype="{{ .Site.BaseURL }}">
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <!-- Title tags -->
  <meta property="og:locale" content="{{ .Language.Lang }}">
  <meta name="language" content="{{ .Language.Lang }}">
  <!-- Title tags -->
  <title itemprop="name">{{ if ne .Permalink "/" }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}</title>
  <meta property="og:title" content="{{ if ne .Permalink "/" }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}" />
  <meta name="twitter:title" content="{{ if ne .Permalink "/" }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}" />
  <meta itemprop="name" content="{{ if ne .Permalink "/" }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}" />
  <meta name="application-name" content="{{ .Site.Title }}" />
  <meta property="og:site_name" content="{{ .Site.Title }}" />
  <!-- Link tags -->
  <base href="{{ .Permalink }}">
  <link rel="canonical" href="{{ .Permalink }}" itemprop="url" />
  <meta name="url" content="{{ .Permalink }}" />
  <meta name="twitter:url" content="{{ .Permalink }}" />
  <meta property="og:url" content="{{ .Permalink }}" />
  <!-- Image tags -->
  {{ with .Params.ogImage }}
    <meta itemprop="image" content="{{ . | absURL }}" />
    <meta property="og:image" content="{{ . | absURL }}" />
    <meta name="twitter:image" content="{{ . | absURL }}" />
    <meta name="twitter:image:src" content="{{ . | absURL }}" />
  {{ else }}
    {{ with .Site.Params.ogImage }}
      <meta itemprop="image" content="{{ . | absURL }}" />
      <meta property="og:image" content="{{ . | absURL }}" />
      <meta name="twitter:image" content="{{ . | absURL }}" />
      <meta name="twitter:image:src" content="{{ . | absURL }}" />
    {{ else }}
      {{ with .Site.Params.cover }}
        <meta itemprop="image" content="{{ . | absURL }}" />
        <meta property="og:image" content="{{ . | absURL }}" />
        <meta name="twitter:image" content="{{ . | absURL }}" />
        <meta name="twitter:image:src" content="{{ . | absURL }}" />
      {{ end }}
    {{ end }}
  {{ end }}
  <meta name="twitter:card" content="summary_large_image" />
  <!-- Description tags -->
  {{ if .IsPage }}
    <meta property="og:type" content="article" />
    <meta itemprop="description" content="{{ .Description | default (substr .Summary 0 160) }}" />
    <meta property="og:description" content="{{ .Description | default (substr .Summary 0 160) }}" />
    <meta name="description" content="{{ .Description | default (substr .Summary 0 160) }}" />
    <meta name="twitter:description" content="{{ .Description | default (substr .Summary 0 160) }}" />
    <meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" />
    <meta name="twitter:label1" value="Reading time" />
    {{ if eq 1 .ReadingTime }}
      <meta name="twitter:data1" value="{{ .ReadingTime }} minute" />
    {{ else }}
      <meta name="twitter:data1" value="{{ .ReadingTime }} minutes" />
    {{ end }}
    <meta name="twitter:label2" value="Published" />
    <meta name="twitter:data2" value="{{ dateFormat "January 2, 2006" (default .Date (.PublishDate)) }}" />
    {{ range .Params.tags }}
      <meta property="article:tag" content="{{ . }}" />
    {{ end }}
  {{ else }}
    <meta property="og:type" content="website" />
    <meta itemprop="description" content="{{ .Site.Params.description }}" />
    <meta property="og:description" content="{{ .Site.Params.description }}" />
    <meta name="description" content="{{ .Site.Params.metadescription | default .Site.Params.description }}" />
    <meta name="twitter:description" content="{{ .Site.Params.description }}" />
  {{ end }}

  <meta property="og:updated_time" content={{ .Lastmod.Format "2006-01-02T15:04:05Z0700" | safeHTML }} />

  {{ if .Keywords }}
    <meta name="keywords" content="{{ delimit .Keywords "," }}" />
  {{ end }}

  {{ with.Params.author }}
    <meta property="og:article:author" content="{{ . }}" />
    <meta property="article:author" content="{{ . }}" />
    <meta name="author" content="{{ . }}" />
  {{ end }}

  {{ with.Params.twitter }}
    <meta name="twitter:creator" content="{{ . }}" />
  {{ end }}

  {{ hugo.Generator }}

  <link rel="dns-prefetch" href="//fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
  {{ if .Site.IsServer }}
    {{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/dev/postcss.config.js") }}
    <link rel="stylesheet" href="{{ $style.RelPermalink }}">
  {{ else }}
    {{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint }}
    <link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
  {{ end }}

  {{ if .Site.Params.RelPermalink}}
  <link href="{{ with .OutputFormats.Get "RSS" }} {{ .RelPermalink  }} {{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
  {{else}}
    {{ if ne .Permalink "/" }}
        <link href="{{ "index.xml" | relURL}}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
    {{ end }}
    {{if .IsNode}}
    <link href="{{ with .OutputFormats.Get "RSS" }} {{ .RelPermalink }} {{ end }}" rel="alternate" type="application/rss+xml" title="{{ if ne .RelPermalink "/" }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}" />
    {{end}}
  {{end}}

  {{with .Site.Params.googleAnalyticsUserID }}
  <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', '{{.}}', 'auto');
    ga('send', 'pageview');

  </script>
  {{end}}
  <script src="https://cdnjs.cloudflare.com/ajax/libs/turbolinks/5.2.0/turbolinks.js"></script>
  {{with .Site.Params.webmention }}
    <link rel="webmention" href="https://webmention.io/{{.}}/webmention">
    <link rel="pingback" href="https://webmention.io/{{.}}/xmlrpc">
  {{end}}
</head>