diff options
author | tdro <tdro@noreply.example.com> | 2022-08-03 02:25:22 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-08-03 02:25:22 -0400 |
commit | eec7f7ea5d99e84ef2a9cf4594b18d1046ae3038 (patch) | |
tree | c3c4d9af65d5ecb6e7f91a52b1dc79fe6ba605fc /themes/default/layouts/_default/home.authors.html | |
parent | 93ff2963616968f377d63f02bb0fa206144da7ae (diff) | |
download | canory-eec7f7ea5d99e84ef2a9cf4594b18d1046ae3038.tar.gz canory-eec7f7ea5d99e84ef2a9cf4594b18d1046ae3038.tar.bz2 canory-eec7f7ea5d99e84ef2a9cf4594b18d1046ae3038.zip |
themes/default/layouts/partials/author-list: Dry up author's slice
Diffstat (limited to 'themes/default/layouts/_default/home.authors.html')
-rw-r--r-- | themes/default/layouts/_default/home.authors.html | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/themes/default/layouts/_default/home.authors.html b/themes/default/layouts/_default/home.authors.html index db67566..c5e60e6 100644 --- a/themes/default/layouts/_default/home.authors.html +++ b/themes/default/layouts/_default/home.authors.html @@ -20,13 +20,9 @@ ) }} - {{ $authors := slice }} + {{ $authors := partial "function-authors-slice.html" . }} - {{- range $index, $data := .Site.Data -}} - {{- $authors = $authors | append $data.user -}} - {{- end -}} - - {{- range $author := (shuffle (uniq $authors)) -}} + {{- range $author := shuffle $authors -}} {{ $data := index $.Site.Data $author | default "default" }} {{ partial "author-card.html" (dict "Data" $data) }} {{ end }} |