fix og description

This commit is contained in:
Greg Gauthier 2022-01-04 22:15:55 +00:00
parent 1109a6bbf6
commit 931aa8e48f

View File

@ -14,15 +14,18 @@
<meta property="og:title" content="{{.Params.Title}}"> <meta property="og:title" content="{{.Params.Title}}">
{{if isset .Params "tags"}} {{if or (isset .Params "tags") (isset .Params "topic") (isset .Params "series") }}
<meta property="og:type" content="article"> <meta property="og:type" content="article">
{{else}} {{else}}
<meta property="og:type" content="website"> <meta property="og:type" content="website">
{{end}} {{end}}
{{if isset .Params "description"}} {{if isset .Params "description"}}
<meta property="og:description" content="{{.Params.description | safeHTML}}"> <meta property="og:description" content="{{ .Params.description | safeHTML}}">
{{else}}
<meta property="og:description" content="{{ .Summary | safeHTML }}">
{{end}} {{end}}
<meta property="og:url" content="{{.Permalink}}"> <meta property="og:url" content="{{.Permalink}}">
<meta name="description" content="{{ if .IsNode }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ else }}{{ with .Description }}{{ . }}{{ end }}{{ end }}"> <meta name="description" content="{{ if .IsNode }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ else }}{{ with .Description }}{{ . }}{{ end }}{{ end }}">