diff options
author | tdro <tdro@noreply.example.com> | 2023-12-30 16:39:52 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-12-30 16:39:52 -0500 |
commit | 9e126e0c3a9546974f91fc83edcdaf5310728c2a (patch) | |
tree | 4f2934710bf87bf219a873fbfadcb92905f6b503 /themes/default/layouts/partials | |
parent | c3f5fba9a08339035b5a409e7acef144f76fa975 (diff) | |
download | canory-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/partials')
5 files changed, 5 insertions, 5 deletions
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 |