add a check for description and for og type

This commit is contained in:
Greg Gauthier 2022-01-04 21:51:27 +00:00
parent 4fbab53d4c
commit 1109a6bbf6
4 changed files with 16 additions and 3 deletions

View File

@ -3,6 +3,7 @@ title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }} date: {{ .Date }}
tags: [] tags: []
topics: [] topics: []
image: /img/ image: img/
description:
draft: true draft: true
--- ---

View File

@ -18,6 +18,7 @@ enableGitInfo = true
[params] [params]
subtitle = "A Philosophical Journal" subtitle = "A Philosophical Journal"
description = "A repository of philosophical musings and personal projects"
brand = "<img src=\"/img/avatar.png\" alt=\"\" width=\"100%\"/><br/><b>Greg Gauthier</b>" brand = "<img src=\"/img/avatar.png\" alt=\"\" width=\"100%\"/><br/><b>Greg Gauthier</b>"
#highlightjs = "tango" #highlightjs = "tango"
#highlightjs_extra_languages = [] #highlightjs_extra_languages = []
@ -28,6 +29,7 @@ enableGitInfo = true
podcastCdnUrl = "https://gmgauthier.us-east-1.linodeobjects.com/podcast/" podcastCdnUrl = "https://gmgauthier.us-east-1.linodeobjects.com/podcast/"
blogCdnUrl = "https://gmgauthier.us-east-1.linodeobjects.com/blog/" blogCdnUrl = "https://gmgauthier.us-east-1.linodeobjects.com/blog/"
avatar = "/img/blog_avatar.jpg" avatar = "/img/blog_avatar.jpg"
[markup] [markup]
[markup.goldmark.renderer] [markup.goldmark.renderer]
unsafe= true unsafe= true

View File

@ -4,6 +4,7 @@ date: 2021-11-23T23:16:16Z
tags: ["rights", "self-defense", "law", "ethics", "nihilism", "gorgias", "imago dei"] tags: ["rights", "self-defense", "law", "ethics", "nihilism", "gorgias", "imago dei"]
topics: ["philosophy","politics", "theology"] topics: ["philosophy","politics", "theology"]
image: img/rittenhouse.jpg image: img/rittenhouse.jpg
description: What the Kyle Rittenhouse trial can teach us about our own metaphysical presuppositions.
draft: false draft: false
--- ---

View File

@ -11,9 +11,18 @@
{{else}} {{else}}
<meta property="og:image" content="{{.Site.BaseURL}}{{.Site.Params.avatar}}"> <meta property="og:image" content="{{.Site.BaseURL}}{{.Site.Params.avatar}}">
{{end}} {{end}}
<meta property="og:title" content="{{.Params.Title}}"> <meta property="og:title" content="{{.Params.Title}}">
{{if isset .Params "tags"}}
<meta property="og:type" content="article"> <meta property="og:type" content="article">
<meta property="og:description" content="{{.Summary | safeHTML}}"> {{else}}
<meta property="og:type" content="website">
{{end}}
{{if isset .Params "description"}}
<meta property="og:description" content="{{.Params.description | safeHTML}}">
{{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 }}">