From 53deccc716211878fc2baaf7b137b2bbac259492 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sun, 16 Nov 2025 18:28:07 -0700 Subject: [PATCH] Get the author shortcode working properly as well. --- layouts/shortcodes/author.html | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/layouts/shortcodes/author.html b/layouts/shortcodes/author.html index a4c5b3b..1c128aa 100644 --- a/layouts/shortcodes/author.html +++ b/layouts/shortcodes/author.html @@ -1,7 +1,15 @@ -{{ if eq (.Get 0) "bug" }} - {{ print "Bug" }} -{{ else if eq (.Get 0) "hyperling" }} - {{ print "Hyperling" }} -{{ else if eq (.Get 0) "hypervegan" }} - {{ print "HyperVegan" }}' -{{ end }} +{{ $author := .Get 0 +}}{{ if or (eq $author "authorBug") (eq $author "bug") +}}{{ .Scratch.Set "author" .Site.Params.authorBug +}}{{ else if or (eq $author "authorHyperling") (eq $author "hyperling") +}}{{ .Scratch.Set "author" .Site.Params.authorHyperling +}}{{ else if or (eq $author "authorHyperVegan") (eq $author "hypervegan") +}}{{ .Scratch.Set "author" .Site.Params.authorHyperVegan +}}{{ else +}}{{ .Scratch.Set "author" $author +}}{{ end +}}{{ $author := .Scratch.Get "author" +}}{{ if $author +}}{{ print "by " $author +}}{{ end +}} \ No newline at end of file