diff options
author | tdro <tdro@noreply.example.com> | 2022-12-28 00:54:50 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-12-28 00:54:50 -0500 |
commit | c1a365ec93422bf34896caa18755fd6b1bf060ee (patch) | |
tree | 86cdc4ede2297253ffcf0a77a71b257b40ccae67 /themes/default/layouts/partials/author-list.html | |
parent | 773db7d222adcf5c4e47bf06dd071417831bfc60 (diff) | |
download | canory-c1a365ec93422bf34896caa18755fd6b1bf060ee.tar.gz canory-c1a365ec93422bf34896caa18755fd6b1bf060ee.tar.bz2 canory-c1a365ec93422bf34896caa18755fd6b1bf060ee.zip |
themes/default/layouts/_default/home.authors: Mix in dates
This could use the page variable directly but it might be useful
for passing stacks of variable data
Diffstat (limited to 'themes/default/layouts/partials/author-list.html')
-rw-r--r-- | themes/default/layouts/partials/author-list.html | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/themes/default/layouts/partials/author-list.html b/themes/default/layouts/partials/author-list.html index 37e3222..bd87ad5 100644 --- a/themes/default/layouts/partials/author-list.html +++ b/themes/default/layouts/partials/author-list.html @@ -4,8 +4,13 @@ <h1>Authors</h1> <aside> {{- range $author := first 3 (shuffle $authors) -}} - {{ $data := index $.Site.Data $author | default "default" }} - {{ partial "author-card.html" (dict "Data" $data) }} - {{ end }} + {{- $data := index $.Site.Data $author | default "default" -}} + {{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}} + {{- partial "author-card.html" (dict + "Data" $data + "Date" $date + ) + -}} + {{- end -}} </aside> </author-list> |