From 9686bf9ce438794d2bd1002bedd89e75ca63cb67 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Sun, 27 Dec 2020 13:12:06 +0800 Subject: fix: og image absolute link --- layouts/partials/opengraph.html | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 layouts/partials/opengraph.html (limited to 'layouts/partials/opengraph.html') diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html new file mode 100644 index 0000000..1437837 --- /dev/null +++ b/layouts/partials/opengraph.html @@ -0,0 +1,45 @@ + + + + + +{{- if .Description -}} + + +{{- else if .Params.description -}} + + +{{- else -}} +{{- if .IsPage -}} + + +{{- end -}} +{{- end -}} + +{{- if .Params.image -}} + + + +{{- else if .Site.Params.og -}} + + + +{{- else -}} + +{{- end -}} + +{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} +{{- if .IsPage -}} +{{- if not .PublishDate.IsZero -}} + +{{- else if not .Date.IsZero -}} + +{{- end -}} +{{- if not .Lastmod.IsZero -}} + +{{- end -}} +{{- else -}} +{{- if not .Date.IsZero -}} + +{{- end -}} +{{- end -}} -- cgit v1.2.3