]> BookStack Code Mirror - website/commitdiff
Added hack multi-author support, updated hacks
authorDan Brown <redacted>
Mon, 27 Mar 2023 13:57:45 +0000 (14:57 +0100)
committerDan Brown <redacted>
Mon, 27 Mar 2023 13:57:45 +0000 (14:57 +0100)
hacks
themes/bookstack/layouts/hacks/single.html

diff --git a/hacks b/hacks
index ad74685fd05d1e5884979de4290c046643a1392e..bd6eb19bce6edc33173c5e54d120be57d297fe03 160000 (submodule)
--- a/hacks
+++ b/hacks
@@ -1 +1 @@
-Subproject commit ad74685fd05d1e5884979de4290c046643a1392e
+Subproject commit bd6eb19bce6edc33173c5e54d120be57d297fe03
index 7939db82c23430b5d9ba09e45f25d94737ea8f2c..cf6c57c8024425338f484a67c368e03994b33ded 100644 (file)
@@ -53,8 +53,8 @@
 
       {{ if .Params.Tested }}
       <ul class="hack-meta">
-        {{ $author := .Params.Author }}
-        <li><strong>Author:</strong> <a href="https://github.com/{{ strings.TrimLeft "@" $author }}" target="_blank">{{ $author }}</a></li>
+        {{ $authors := strings.Split .Params.Author " " }}
+        <li><strong>Author{{ if gt (len $authors) 1 }}s{{end}}:</strong> {{ range $authors }}<a href="https://github.com/{{ strings.TrimLeft "@" . }}" target="_blank">{{ . }}</a> {{ end }}</li>
         <li><strong>Created:</strong> {{ .Date.Format "2" | humanize }} {{ .Date.Format "Jan 2006" }}</li>
         <li><strong>Updated:</strong> {{ .Params.Updated.Format "2" | humanize }} {{ .Params.Updated.Format "Jan 2006" }}</li>
         <li><strong>Last Tested On:</strong> {{ .Params.Tested }}</li>