Skip to content

Commit

Permalink
fix: social image meta tag
Browse files Browse the repository at this point in the history
Close #410
  • Loading branch information
razonyang committed Feb 21, 2022
1 parent e16f390 commit de4a40f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/head/meta/social.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{- $images := .Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- if and (not $featured) (not .Params.images) -}}
{{- if and (not $featured) (not .Params.images) (not .Site.Params.images) -}}
{{- $image := default "images/logo.png" .Site.Params.logo -}}
<meta property="og:image" content="{{ $image | absURL }}"/>
<meta name="twitter:image" content="{{ $image | absURL }}"/>
Expand Down

0 comments on commit de4a40f

Please sign in to comment.