diff options
Diffstat (limited to 'themes/default/layouts/partials/generate-authors.html')
-rw-r--r-- | themes/default/layouts/partials/generate-authors.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/themes/default/layouts/partials/generate-authors.html b/themes/default/layouts/partials/generate-authors.html index 61cc5a6..d1fc0c2 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/authors/" $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,19 +48,19 @@ {{- $writeToFile := $template.Permalink -}} {{- $template := resources.ExecuteAsTemplate - (print "/data/generates/content/" . "/likes/" "_index.md") + (print "/data/generates/content/" $author "/marks/" "_index.md") (dict - "author" . - "layout" "section.likes" + "author" $author + "layout" "section.marks" ) $markdown -}} {{- $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 |