|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html lang="{{ .Site.Language }}"> |
3 | 3 | <head> |
| 4 | + {{ $title := (cond (.IsHome) .Site.Title .Title) }} |
| 5 | + {{ $description := (cond (.IsHome) .Site.Params.Description .Description ) }} |
| 6 | + {{ $author := (cond (.IsHome) .Site.Params.Author .Params.Author) }} |
| 7 | + |
4 | 8 | <!-- Primary Meta Tags --> |
5 | | - <title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title> |
| 9 | + <title>{{ $title }}</title> |
6 | 10 | <link rel="canonical" href="{{ .Site.BaseURL }}"> |
7 | 11 | <link rel="icon" href="/favicon.ico"> |
8 | | - <meta name="description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}"> |
| 12 | + <meta name="description" content="{{ $description }}"> |
| 13 | + <meta name="author" content="{{ $author }}"> |
9 | 14 |
|
10 | 15 | <!-- Open Graph / Facebook --> |
11 | | - <meta property="og:title" content="{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}" /> |
| 16 | + <meta property="og:title" content="{{ $title }}" /> |
12 | 17 | <meta property="og:type" content="website" /> |
13 | 18 | <meta property="og:url" content="{{ .Site.BaseURL }}" /> |
14 | 19 | <meta property="og:image" content="/icon.png" /> |
15 | | - <meta property="og:description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}" /> |
| 20 | + <meta property="og:description" content="{{ $description }}" /> |
16 | 21 |
|
17 | 22 | <!-- X (Twitter) --> |
18 | 23 | <meta property="twitter:card" content="summary" /> |
19 | 24 | <meta property="twitter:url" content="{{ .Site.BaseURL }}" /> |
20 | | - <meta property="twitter:title" content="{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}" /> |
21 | | - <meta property="twitter:description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}" /> |
| 25 | + <meta property="twitter:title" content="{{ $title }}" /> |
| 26 | + <meta property="twitter:description" content="{{ $description }}" /> |
22 | 27 | <meta property="twitter:image" content="/icon.png" /> |
23 | 28 |
|
24 | 29 | <!-- Meta Tags Generated with https://metatags.io --> |
|
0 commit comments