|
| 1 | +{{ $are_prof_slice := reflect.IsSlice .Params.authors }} |
| 2 | + |
1 | 3 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
2 | 4 | <meta name="description" content="{{ .Params.description }}"> |
3 | 5 | {{ range $key, $value := $.Params.meta }} |
4 | | -<meta name="{{ $key }}" {{ range $k, $v := $value }}{{ printf "%s=\"%s\"" $k $v | safeHTMLAttr }}{{ end }}> |
| 6 | + <meta name="{{ $key }}" {{ range $k, $v := $value }}{{ printf "%s=\"%s\"" $k $v | safeHTMLAttr }}{{ end }}> |
5 | 7 | {{ end }} |
6 | | -<title>{{ .Page.Title }} - {{ .Site.Data._author.name }}</title> |
| 8 | + |
| 9 | +<title>{{ .Page.Title }} - {{ if $are_prof_slice }}{{ delimit .Params.authors ", " }}{{ else }}{{ .Params.authors }}{{ end }}</title> |
7 | 10 | <meta property="og:title" content="{{ .Params.Title }}" /> |
8 | 11 | <meta property="og:description" content="{{ .Params.summary }}" /> |
9 | 12 | <meta property="og:type" content="website" /> |
10 | 13 | <meta property="og:locale" content="en_US" /> |
11 | 14 | <meta property="og:url" content="{{ .Permalink }}" /> |
12 | | -<meta property="og:video" content="{{ with .Resources.Get "after-raf.webm" }} {{ .Permalink }} {{ end }}"> |
| 15 | + |
| 16 | +{{ if $are_prof_slice }} |
| 17 | + {{ range .Params.authors }} |
| 18 | + <meta property="article:author" content="{{ . }}"> |
| 19 | + {{ end }} |
| 20 | +{{ else }} |
| 21 | + <meta property="article:author" content="{{ .Params.authors }}"> |
| 22 | +{{ end }} |
| 23 | + |
| 24 | +{{ $are_tags_slice := reflect.IsSlice .Params.tags }} |
| 25 | +{{ if $are_tags_slice }} |
| 26 | + {{ range .Params.tags }} |
| 27 | + <meta property="og:tag" content="{{ . }}" /> |
| 28 | + {{ end }} |
| 29 | +{{ else }} |
| 30 | + <meta property="og:tag" content="{{ .Params.tags }}" /> |
| 31 | +{{ end }} |
| 32 | + |
| 33 | +{{ $layout := "2006-01-02T15:04:05-07:00" }} |
| 34 | +{{ if .Params.date }} |
| 35 | + <meta property="article:published_time" content="{{ time.AsTime .Params.date | time.Format $layout }}"> |
| 36 | +{{ end }} |
| 37 | + |
| 38 | +<meta property="og:image" content="{{ with .Resources.Get .Params.open_graph.image }}{{ .Permalink }}{{ end }}"> |
| 39 | +<meta property="og:video" content="{{ with .Resources.Get .Params.open_graph.video }}{{ .Permalink }}{{ end }}"> |
13 | 40 | <!-- <meta property="og:image" content="https://ia.media-imdb.com/images/rock.jpg" /> --> |
14 | 41 |
|
15 | 42 | <link rel="icon" type="image/x-icon" href="/img/favicon.png"> |
|
0 commit comments