diff options
author | tdro <tdro@noreply.example.com> | 2023-06-18 18:32:33 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-06-18 18:32:33 -0400 |
commit | 69591d98d61888c211b986bf96a36014590b4cbf (patch) | |
tree | d5e2dc71a73ea77786080ab5fb2a3878cab65b37 /themes/default/layouts/partials | |
parent | 23b45c260c734539c684df8b713c32dbea375532 (diff) | |
download | canory-69591d98d61888c211b986bf96a36014590b4cbf.tar.gz canory-69591d98d61888c211b986bf96a36014590b4cbf.tar.bz2 canory-69591d98d61888c211b986bf96a36014590b4cbf.zip |
themes/default/layouts/_default/section: Write gallery, webring, following once
Check for parent node
Diffstat (limited to 'themes/default/layouts/partials')
-rw-r--r-- | themes/default/layouts/partials/generate-authors.html | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/themes/default/layouts/partials/generate-authors.html b/themes/default/layouts/partials/generate-authors.html index 61cc5a6..a0fd825 100644 --- a/themes/default/layouts/partials/generate-authors.html +++ b/themes/default/layouts/partials/generate-authors.html @@ -1,13 +1,13 @@ -{{- range .Site.Author.list -}} +{{- range $author := .Site.Author.list -}} - {{- if not (fileExists (print "data/" . ".yaml")) -}} + {{- if not (fileExists (print "data/" $author ".yaml")) -}} {{- $configuration := resources.Get "templates/author.yaml" -}} {{- $configuration := resources.ExecuteAsTemplate - (print "/data/generates/authors/" . ".yaml") + (print "/data/generates/authors/" $author ".yaml") (dict - "Name" (title .) - "User" . + "Name" (title $author) + "User" $author ) $configuration -}} @@ -18,9 +18,9 @@ {{- $markdown := resources.Get "templates/markdown-frontmatter.yaml" -}} {{- $template := resources.ExecuteAsTemplate - (print "/data/generates/content/" . "/" "_index.md") + (print "/data/generates/content/" $author "/" "_index.md") (dict - "author" . + "author" $author "layout" "section" ) $markdown @@ -28,9 +28,9 @@ {{- $writeToFile := $template.Permalink -}} {{- $template := resources.ExecuteAsTemplate - (print "/data/generates/content/" . "/feeds/" "_index.md") + (print "/data/generates/content/" $author "/feeds/" "_index.md") (dict - "author" . + "author" $author "layout" "section.feeds" ) $markdown @@ -38,9 +38,9 @@ {{- $writeToFile := $template.Permalink -}} {{- $template := resources.ExecuteAsTemplate - (print "/data/generates/content/" . "/media/" "_index.md") + (print "/data/generates/content/" $author "/media/" "_index.md") (dict - "author" . + "author" $author "layout" "section.media" ) $markdown @@ -48,9 +48,9 @@ {{- $writeToFile := $template.Permalink -}} {{- $template := resources.ExecuteAsTemplate - (print "/data/generates/content/" . "/likes/" "_index.md") + (print "/data/generates/content/" $author "/likes/" "_index.md") (dict - "author" . + "author" $author "layout" "section.likes" ) $markdown @@ -58,9 +58,9 @@ {{- $writeToFile := $template.Permalink -}} {{- $template := resources.ExecuteAsTemplate - (print "/data/generates/content/" . "/drafts/" "_index.md") + (print "/data/generates/content/" $author "/drafts/" "_index.md") (dict - "author" . + "author" $author "layout" "section.drafts" ) $markdown |