aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-12-30 16:39:52 -0500
committertdro <tdro@noreply.example.com>2023-12-30 16:39:52 -0500
commit9e126e0c3a9546974f91fc83edcdaf5310728c2a (patch)
tree4f2934710bf87bf219a873fbfadcb92905f6b503 /themes/default/layouts
parentc3f5fba9a08339035b5a409e7acef144f76fa975 (diff)
downloadcanory-9e126e0c3a9546974f91fc83edcdaf5310728c2a.tar.gz
canory-9e126e0c3a9546974f91fc83edcdaf5310728c2a.tar.bz2
canory-9e126e0c3a9546974f91fc83edcdaf5310728c2a.zip
config: Data mounting nesting
Apparently nesting/namespacing works. Dicey code bootstrapping/generation.
Diffstat (limited to 'themes/default/layouts')
-rw-r--r--themes/default/layouts/_default/home.authors.html2
-rw-r--r--themes/default/layouts/_default/home.authors.section.html2
-rw-r--r--themes/default/layouts/partials/base-footer.html2
-rw-r--r--themes/default/layouts/partials/base-title.html2
-rw-r--r--themes/default/layouts/partials/function-authors-data.html2
-rw-r--r--themes/default/layouts/partials/function-authors-slice.html2
-rw-r--r--themes/default/layouts/partials/generate-authors.html2
7 files changed, 7 insertions, 7 deletions
diff --git a/themes/default/layouts/_default/home.authors.html b/themes/default/layouts/_default/home.authors.html
index 3854ebe..0662285 100644
--- a/themes/default/layouts/_default/home.authors.html
+++ b/themes/default/layouts/_default/home.authors.html
@@ -26,7 +26,7 @@
{{- $authors := partial "function-authors-slice.html" . -}}
{{- range $author := $authors -}}
- {{- $data := index $.Site.Data $author -}}
+ {{- $data := index $.Site.Data.authors $author -}}
{{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}}
{{- partial "author-card.html" (dict
"Data" $data
diff --git a/themes/default/layouts/_default/home.authors.section.html b/themes/default/layouts/_default/home.authors.section.html
index 20ffdc6..b0b1161 100644
--- a/themes/default/layouts/_default/home.authors.section.html
+++ b/themes/default/layouts/_default/home.authors.section.html
@@ -9,7 +9,7 @@
{{- if $modified -}}
{{- range $author := first 3 $authors -}}
- {{- $data := index $.Site.Data $author -}}
+ {{- $data := index $.Site.Data.authors $author -}}
{{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}}
{{- partial "author-card.html" (dict
"Data" $data
diff --git a/themes/default/layouts/partials/base-footer.html b/themes/default/layouts/partials/base-footer.html
index 3873153..cae0cbf 100644
--- a/themes/default/layouts/partials/base-footer.html
+++ b/themes/default/layouts/partials/base-footer.html
@@ -1,5 +1,5 @@
{{- $kind := in (slice "home" "taxonomy" "term") .Page.Kind -}}
-{{- $author := index .Site.Data .Section -}}
+{{- $author := index .Site.Data.authors .Section -}}
<footer>
{{- if $kind -}}
diff --git a/themes/default/layouts/partials/base-title.html b/themes/default/layouts/partials/base-title.html
index c8736b1..fff4530 100644
--- a/themes/default/layouts/partials/base-title.html
+++ b/themes/default/layouts/partials/base-title.html
@@ -1,4 +1,4 @@
-{{- $author := index .Site.Data .Section -}}
+{{- $author := index .Site.Data.authors .Section -}}
{{- if not (eq .Title $.Site.Title) -}}
{{- with $title := or .Title .Summary -}}
diff --git a/themes/default/layouts/partials/function-authors-data.html b/themes/default/layouts/partials/function-authors-data.html
index d9eaade..dbc2c67 100644
--- a/themes/default/layouts/partials/function-authors-data.html
+++ b/themes/default/layouts/partials/function-authors-data.html
@@ -4,6 +4,6 @@
{{- $author := $pageContext.Section -}}
-{{- $output := index $pageContext.Site.Data $author -}}
+{{- $output := index $pageContext.Site.Data.authors $author -}}
{{- return $output -}}
diff --git a/themes/default/layouts/partials/function-authors-slice.html b/themes/default/layouts/partials/function-authors-slice.html
index 3f622b9..fc25554 100644
--- a/themes/default/layouts/partials/function-authors-slice.html
+++ b/themes/default/layouts/partials/function-authors-slice.html
@@ -1,7 +1,7 @@
{{- $authors := slice -}}
{{- range $user := .Site.Author.list -}}
- {{- with $author := index $.Site.Data $user -}}
+ {{- with $author := index $.Site.Data.authors $user -}}
{{- $authors = $authors | append $author.user -}}
{{- end -}}
{{- end -}}
diff --git a/themes/default/layouts/partials/generate-authors.html b/themes/default/layouts/partials/generate-authors.html
index 29c991d..d1fc0c2 100644
--- a/themes/default/layouts/partials/generate-authors.html
+++ b/themes/default/layouts/partials/generate-authors.html
@@ -1,6 +1,6 @@
{{- range $author := .Site.Author.list -}}
- {{- if not (fileExists (print "data/" $author ".yaml")) -}}
+ {{- if not (fileExists (print "data/authors/" $author ".yaml")) -}}
{{- $configuration := resources.Get "templates/author.yaml" -}}
{{- $configuration := resources.ExecuteAsTemplate