This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
/
meta.html
37 lines (36 loc) · 1.91 KB
/
meta.html
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
<meta name="description" content="{{ if .Params.Subtitle }}{{ .Params.Subtitle }}{{else}}{{ .Site.Params.Subtitle }}{{ end }}" />
<title itemprop="name">{{ default .Site.Title .Title }}</title>
<meta property="og:title" content="{{ default .Site.Title .Title }}" />
<meta name="twitter:title" content="{{ default .Site.Title .Title }}" />
<meta itemprop="name" content="{{ default .Site.Title .Title }}" />
<meta property="og:site_name" content="{{ .Site.Params.sitename }}" />
<meta name="description" content="{{ default .Site.Params.Subtitle .Params.Subtitle }}" />
<meta itemprop="description" content="{{ default .Site.Params.Subtitle .Params.Subtitle }}" />
<meta property="og:description" content="{{ default .Site.Params.Subtitle .Params.Subtitle }}" />
<meta name="twitter:description" content="{{ default .Site.Params.Subtitle .Params.Subtitle }}" />
<base href="{{ .RelPermalink }}">
<link rel="canonical" href="{{ .Permalink }}" itemprop="url" />
<meta name="url" content="{{ .Permalink }}" />
<meta property="og:url" content="{{ .Permalink }}" />
<meta name="twitter:url" content="{{ .Permalink }}" />
<meta name="twitter:card" content="summary" />
{{ with .Site.Params.Author }}
<meta name="twitter:creator" content="{{ . }}" />
{{ end }}
{{ $img := slice }}
{{ $scratch := newScratch }}
{{ if .Params.images }}
{{ partial "helpers/get" (dict "scratch" $scratch "row" .Params ) }}
{{ $img = $scratch.Get "img" }}
{{ else if .Site.Params.image }}
{{ $row := dict "images" (slice .Site.Params.image) }}
{{ partial "helpers/get" (dict "scratch" $scratch "row" $row) }}
{{ $img = $scratch.Get "img" }}
{{ end }}
{{ with $img }}
{{ $i := .Fill "800x418 center png" }}
<meta itemprop="image" content="{{ $i.Permalink }}" />
<meta property="og:image" content="{{ $i.Permalink }}" />
<meta name="twitter:image" content="{{ $i.Permalink }}" />
{{ end }}
<meta property="og:locale" content="{{ .Language.Lang }}">