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 }}
tags: []
topics: []
image: /img/
image: img/
description:
draft: true
---

View File

@ -18,6 +18,7 @@ enableGitInfo = true
[params]
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>"
#highlightjs = "tango"
#highlightjs_extra_languages = []
@ -28,6 +29,7 @@ enableGitInfo = true
podcastCdnUrl = "https://gmgauthier.us-east-1.linodeobjects.com/podcast/"
blogCdnUrl = "https://gmgauthier.us-east-1.linodeobjects.com/blog/"
avatar = "/img/blog_avatar.jpg"
[markup]
[markup.goldmark.renderer]
unsafe= true

View File

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

View File

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