From 6a406636df8c1677eabbfb2ef2d58371bc9b69f9 Mon Sep 17 00:00:00 2001 From: Alexander Beattie Date: Sat, 12 Feb 2022 09:48:57 -0600 Subject: [PATCH 1/2] Add author field --- layouts/blog/single.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/blog/single.html b/layouts/blog/single.html index fa1f646a..0422742f 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -9,6 +9,9 @@

{{ .Title | markdownify }}

{{ .Title | markdownify }}

+

+ By {{ .Params.author | markdownify }} +

{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }} {{ if .Site.Params.showReadingTime | default true }} From bfba46f203d1b3d38b39762b8085f8992c3aebcf Mon Sep 17 00:00:00 2001 From: Alexander Beattie Date: Mon, 14 Feb 2022 13:51:03 -0600 Subject: [PATCH 2/2] Check if author exists --- layouts/blog/single.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 0422742f..053b301b 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -9,9 +9,11 @@

{{ .Title | markdownify }}

{{ .Title | markdownify }}

+ {{ if .Params.author }}

By {{ .Params.author | markdownify }}

+ {{ end }}
{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }} {{ if .Site.Params.showReadingTime | default true }}