multiple fixes explained
1. og:type and og:title are both duplicates 2. switch og:type based on current location (website) or (article) 3. og:image use featuredimage first if available, if not use ogimage for fallback
This commit is contained in:
parent
dcd02bb3d5
commit
8ef17f28fe
|
@ -6,13 +6,11 @@
|
||||||
<meta name="twitter:title" content="{{ .Title }} | {{ .Site.Title }}" />
|
<meta name="twitter:title" content="{{ .Title }} | {{ .Site.Title }}" />
|
||||||
<meta itemprop="name" content="{{ .Title }} | {{ .Site.Title }}" />
|
<meta itemprop="name" content="{{ .Title }} | {{ .Site.Title }}" />
|
||||||
<meta name="application-name" content="{{ .Title }} | {{ .Site.Title }}" />
|
<meta name="application-name" content="{{ .Title }} | {{ .Site.Title }}" />
|
||||||
<meta property="og:type" content="website" />
|
|
||||||
<meta property="og:title" content="{{ .Site.Title }}" />
|
|
||||||
<meta property="og:description"
|
<meta property="og:description"
|
||||||
content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}" />
|
content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}" />
|
||||||
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
||||||
<meta property="og:url" content="{{ .Permalink }}" />
|
<meta property="og:url" content="{{ .Permalink }}" />
|
||||||
<meta property="og:locale" content="en">
|
<meta property="og:locale" content="en">
|
||||||
<meta property="og:image" content="{{ .Params.Site.BaseURL }}{{ .Site.Params.og_image | relURL }}" />
|
<meta property="og:image" content="{{ if .Params.featured_image }}{{ .Params.featured_image | relURL }}{{ else }}{{ .Site.Params.og_image | relURL }}{{ end }}" />
|
||||||
<meta property="og:image:secure_url" content="{{ .Site.Params.og_image | absURL }}" />
|
<meta property="og:image:secure_url" content="{{ if .Params.featured_image }}{{ .Params.featured_image | absURL }}{{ else }}{{ .Site.Params.og_image | absURL }}{{ end }}" />
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="{{if .IsHome}}website{{else}}article{{end}}" />
|
||||||
|
|
Loading…
Reference in New Issue