Skip to content

Commit

Permalink
fix opengraph image (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesjarvis authored Jun 5, 2024
1 parent 4b90566 commit 656536e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion layouts/partials/opengraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
<meta property="og:site_name" content="{{ . }}">
{{- end }}

{{ with .Site.Language.Params.Author.image }}
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
<meta property="og:logo" content="{{ ($authorImage.Resize "200x").Permalink }}">
{{ end }}
{{ end }}

{{- with or .Title site.Title site.Params.title | plainify}}
<meta property="og:title" content="{{ . }}">
{{- end }}
Expand Down Expand Up @@ -35,7 +42,7 @@

{{- with partial "_funcs/get-page-images" . }}
{{- range . | first 6 }}
<meta property="og:image" content="{{ (.Image.Resize "1320x webp").RelPermalink }}">
<meta property="og:image" content="{{ (.Image.Resize "660x").Permalink }}">
{{- end }}
{{- end }}

Expand Down

0 comments on commit 656536e

Please sign in to comment.