Fix twitter image url for non-home

Co-Authored-By: Radek Kozieł <radoslaw.koziel@gmail.com>
This commit is contained in:
willstocks 2020-03-16 10:52:14 +00:00 committed by panr
parent 1d47e2102a
commit f2fd8fbc63

View File

@ -32,7 +32,7 @@
<meta name="twitter:description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}" /> <meta name="twitter:description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta name="twitter:site" content="{{ .Permalink }}" /> <meta name="twitter:site" content="{{ .Permalink }}" />
<meta name="twitter:creator" content="{{ if .IsHome }}{{ $.Site.Owner }}{{ else }}{{ .Params.Author }}{{ end }}" /> <meta name="twitter:creator" content="{{ if .IsHome }}{{ $.Site.Owner }}{{ else }}{{ .Params.Author }}{{ end }}" />
<meta name="twitter:image" content="{{ if .IsHome }}{{ $.Site.Params.favicon | absURL }}{{else}}{{ with .Params.Cover }}{{ . | absURL }}{{ end }}"> <meta name="twitter:image" content="{{ if .IsHome }}{{ $.Site.Params.favicon | absURL }}{{else}}{{ .Params.Cover | absURL }}{{ end }}">
<!-- OG data --> <!-- OG data -->
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" /> <meta property="og:locale" content="{{ $.Site.Language.Lang }}" />