From 48c2aeff491e8c12f21eed0d9ea0c56742a49f14 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sun, 16 Nov 2025 12:48:34 -0700 Subject: [PATCH] Learning if-then in Hugo/Go templates. --- layouts/shortcodes/author.html | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 layouts/shortcodes/author.html diff --git a/layouts/shortcodes/author.html b/layouts/shortcodes/author.html new file mode 100644 index 0000000..a4c5b3b --- /dev/null +++ b/layouts/shortcodes/author.html @@ -0,0 +1,7 @@ +{{ if eq (.Get 0) "bug" }} + {{ print "Bug" }} +{{ else if eq (.Get 0) "hyperling" }} + {{ print "Hyperling" }} +{{ else if eq (.Get 0) "hypervegan" }} + {{ print "HyperVegan" }}' +{{ end }}