Re-add support for cover images in OpenGraph

4a4d0c0
This commit is contained in:
Aditya Telange 2024-11-09 11:46:39 +05:30
parent 8c5833bad0
commit d360267d4e
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 11 additions and 3 deletions

View File

@ -33,11 +33,19 @@
<meta property="og:type" content="website">
{{- end }}
{{- if .Params.cover.image -}}
{{- if (ne .Params.cover.relative true) }}
<meta property="og:image" content="{{ .Params.cover.image | absURL }}">
{{- else}}
<meta property="og:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}">
{{- end}}
{{- else }}
{{- with partial "_funcs/get-page-images" . }}
{{- range . | first 6 }}
<meta property="og:image" content="{{ .Permalink }}">
{{- end }}
{{- end }}
{{- end }}
{{- with .Params.audio }}
{{- range . | first 6 }}