From 168c9d93ad2709568cd962c11082b36eba9dd108 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Wed, 27 Oct 2021 19:51:46 -0500 Subject: [PATCH] Add meta tags for author, and don't allow old `author` param --- layouts/partials/author-metadata.html | 9 +++++++++ layouts/partials/head.html | 2 ++ layouts/partials/post-metadata.html | 12 +----------- 3 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 layouts/partials/author-metadata.html diff --git a/layouts/partials/author-metadata.html b/layouts/partials/author-metadata.html new file mode 100644 index 0000000..83656cc --- /dev/null +++ b/layouts/partials/author-metadata.html @@ -0,0 +1,9 @@ +{{ with .Params.authors }} + + + +{{ range . }} + +{{ end }} + +{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 3abf0e0..dfc9ada 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -32,4 +32,6 @@ {{ template "_internal/schema.html" . }} + + {{ partial "author-metadata.html" . }} diff --git a/layouts/partials/post-metadata.html b/layouts/partials/post-metadata.html index d6e98cf..a897fea 100644 --- a/layouts/partials/post-metadata.html +++ b/layouts/partials/post-metadata.html @@ -20,20 +20,10 @@ {{ end }} {{ end }} - {{ $authorString := "" }} - {{ with .Params.authors }} - {{ $authorString = delimit . ", " }} - {{ else }} - {{ with .Params.author }} - {{ $authorString = . }} - {{ end }} - {{ end }} - - {{ with $authorString }} {{ partial "icon.html" "user-circle" }} - {{ . }} + {{ delimit . ", " }} {{ end }}