blob: b7bb22eb7fed21013ae8f606f5ec327e9786587a (
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
|
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Hugo {{ hugo.Version }} with theme Tranquilpeak 0.5.0-SNAPSHOT">
<meta name="author" content="{{ .Site.Author.name }}">
<meta name="keywords" content="{{ with .Keywords }}{{ delimit . ", " }}{{ end }}{{ if .Site.Params.keywords }}, {{ delimit .Site.Params.keywords ", " }}{{ end }}">
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<!-- Meta Social -->
<meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
<meta property="og:title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}">
<meta name="twitter:title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="twitter:url" content="{{ .Permalink }}">
<meta property="og:site_name" content="{{ .Site.Title }}">
<meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta name="twitter:description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta property="og:locale" content="{{ .Lang }}">
{{ if .IsPage }}
{{ if not .PublishDate.IsZero }}
<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05" }}">
{{ end }}
{{ if not .Lastmod.IsZero }}
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05" }}">
{{ end }}
{{ if not .ExpiryDate.IsZero }}
<meta property="article:expiration_time" content="{{ .ExpiryDate.Format "2006-01-02T15:04:05" }}">
{{ end }}
{{ with .Params.categories }}
{{ range $v := . }}
<meta property="article:section" content="{{ $v }}">
{{ end }}
{{ end }}
{{ with .Params.tags }}
{{ range $v := . }}
<meta property="article:tag" content="{{ $v }}">
{{ end }}
{{ end }}
{{ end }}
<meta name="twitter:card" content="summary">
{{ with .Site.Author.twitter }}
<meta name="twitter:site" content="@{{ . }}">
{{ end }}
{{ if .Params.twitter }}
<meta name="twitter:creator" content="@{{ .Params.twitter }}">
{{ else if .Site.Author.twitter }}
<meta name="twitter:creator" content="@{{ .Site.Author.twitter }}">
{{ end }}
{{ with .Site.Params.fbAppId }}
<meta property="fb:app_id" content="{{ . }}">
{{ end }}
{{ with .Site.Params.fbAdminIds }}
{{ range . }}
<meta property="fb:admins" content="{{ . }}">
{{ end }}
{{ end }}
{{ with .Params.thumbnailImage }}
<meta property="og:image" content="{{ . | absURL }}">
<meta property="twitter:image" content="{{ . | absURL }}">
{{ end }}
{{ with .Params.coverImage }}
<meta property="og:image" content="{{ . | absURL }}">
<meta property="twitter:image" content="{{ . | absURL }}">
{{ end }}
{{ with .Params.gallery }}
{{ range . }}
<meta property="og:image" content="{{ range first 1 (split . " ") }}{{ . | absURL }}{{ end }}">
<meta property="twitter:image" content="{{ range first 1 (split . " ") }}{{ . | absURL }}{{ end }}">
{{ end }}
{{ end }}
{{ if .Scratch.Get "gravatarEmail" }}
<meta property="og:image" content="https://www.gravatar.com/avatar/{{ (md5 (.Scratch.Get "gravatarEmail")) | urlize }}?s=640">
<meta property="twitter:image" content="https://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 }}">
<meta property="twitter:image" content="{{ .Site.Author.picture | absURL }}">
{{ end }}
|