mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-04-16 00:48:06 -04:00
Re-add support for cover images in OpenGraph
4a4d0c0
This commit is contained in:
parent
8c5833bad0
commit
d360267d4e
@ -33,9 +33,17 @@
|
|||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with partial "_funcs/get-page-images" . }}
|
{{- if .Params.cover.image -}}
|
||||||
{{- range . | first 6 }}
|
{{- if (ne .Params.cover.relative true) }}
|
||||||
<meta property="og:image" content="{{ .Permalink }}">
|
<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 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user