|
1 | | -<meta property="og:title" content="{{ .Title }}" /> |
2 | | -<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" /> |
3 | | -<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" /> |
4 | | -<meta property="og:url" content="{{ .Permalink }}" /> |
| 1 | +<meta property="og:title" content="{{ .Title }}"> |
| 2 | +<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"> |
| 3 | +<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}"> |
| 4 | +<meta property="og:url" content="{{ .Permalink }}"> |
5 | 5 | {{- if .Params.cover.image -}} |
6 | 6 | {{- if (ne .Params.cover.relative true) }} |
7 | | -<meta property="og:image" content="{{ .Params.cover.image | absURL }}" /> |
| 7 | +<meta property="og:image" content="{{ .Params.cover.image | absURL }}"> |
8 | 8 | {{- else}} |
9 | | -<meta property="og:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}" /> |
| 9 | +<meta property="og:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}"> |
10 | 10 | {{- end}} |
11 | 11 | {{- else }} |
12 | 12 |
|
13 | 13 | {{- $images := partial "partials/templates/_funcs/get-page-images" . -}} |
14 | 14 | {{- range first 6 $images }} |
15 | | -<meta property="og:image" content="{{ .Permalink }}" /> |
| 15 | +<meta property="og:image" content="{{ .Permalink }}"> |
16 | 16 | {{ end -}} |
17 | 17 | {{- end }} |
18 | 18 |
|
19 | 19 | {{- if .IsPage }} |
20 | 20 | {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} |
21 | | -<meta property="article:section" content="{{ .Section }}" /> |
22 | | -{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }} |
23 | | -{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }} |
| 21 | +<meta property="article:section" content="{{ .Section }}"> |
| 22 | +{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>{{ end }} |
| 23 | +{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>{{ end }} |
24 | 24 | {{- end -}} |
25 | 25 |
|
26 | | -{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }} |
27 | | -{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }} |
28 | | -{{- with site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }} |
| 26 | +{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}">{{ end }} |
| 27 | +{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}">{{ end }} |
| 28 | +{{- with site.Params.title }}<meta property="og:site_name" content="{{ . }}">{{ end }} |
29 | 29 | {{- with .Params.videos }}{{- range . }} |
30 | | -<meta property="og:video" content="{{ . | absURL }}" /> |
| 30 | +<meta property="og:video" content="{{ . | absURL }}"> |
31 | 31 | {{ end }}{{ end }} |
32 | 32 |
|
33 | 33 | {{- /* If it is part of a series, link to related articles */}} |
|
37 | 37 | {{ with .Params.series }}{{- range $name := . }} |
38 | 38 | {{- $series := index $siteSeries ($name | urlize) }} |
39 | 39 | {{- range $page := first 6 $series.Pages }} |
40 | | - {{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }} |
| 40 | + {{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}">{{ end }} |
41 | 41 | {{- end }} |
42 | 42 | {{ end }}{{ end }} |
43 | 43 | {{- end }} |
|
46 | 46 | {{- with site.Params.social }} |
47 | 47 | {{- if reflect.IsMap . }} |
48 | 48 | {{- with .facebook_admin }} |
49 | | - <meta property="fb:admins" content="{{ . }}" /> |
| 49 | + <meta property="fb:admins" content="{{ . }}"> |
50 | 50 | {{- end }} |
51 | 51 | {{- end }} |
52 | 52 | {{- end }} |
0 commit comments