aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/home.authors.section.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-01-06 03:57:02 -0500
committertdro <tdro@noreply.example.com>2023-01-06 04:16:39 -0500
commit036d5bd8bd2bfc2a77c43f8dbfa8e90ae8ee8b76 (patch)
tree7550133ef57e7ff86a5db9a0195266cc92dcce56 /themes/default/layouts/_default/home.authors.section.html
parent6f40c9a8d7263f82eb97009897502588f7236ce2 (diff)
downloadcanory-0.11.10.tar.gz
canory-0.11.10.tar.bz2
canory-0.11.10.zip
themes/default/layouts/partials/author-list: Generate once0.11.10
Let it appear on second generation
Diffstat (limited to 'themes/default/layouts/_default/home.authors.section.html')
-rw-r--r--themes/default/layouts/_default/home.authors.section.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/home.authors.section.html b/themes/default/layouts/_default/home.authors.section.html
new file mode 100644
index 0000000..8b868f9
--- /dev/null
+++ b/themes/default/layouts/_default/home.authors.section.html
@@ -0,0 +1,11 @@
+{{- $authors := partial "function-authors-slice.html" . -}}
+
+{{- range $author := first 3 (shuffle $authors) -}}
+{{- $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 -}}