diff options
Diffstat (limited to 'themes/default/layouts/partials/generate-authors.html')
-rw-r--r-- | themes/default/layouts/partials/generate-authors.html | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/themes/default/layouts/partials/generate-authors.html b/themes/default/layouts/partials/generate-authors.html index 8e2081f..d1fc0c2 100644 --- a/themes/default/layouts/partials/generate-authors.html +++ b/themes/default/layouts/partials/generate-authors.html @@ -1,70 +1,70 @@ -{{- 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 -}} - {{- $writeToFile := $configuration.RelPermalink -}} + {{- $writeToFile := $configuration.Permalink -}} {{- end -}} {{- $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 -}} - {{- $writeToFile := $template.RelPermalink -}} + {{- $writeToFile := $template.Permalink -}} {{- $template := resources.ExecuteAsTemplate - (print "/data/generates/content/" . "/feeds/" "_index.md") + (print "/data/generates/content/" $author "/feeds/" "_index.md") (dict - "author" . - "layout" "feeds" + "author" $author + "layout" "section.feeds" ) $markdown -}} - {{- $writeToFile := $template.RelPermalink -}} + {{- $writeToFile := $template.Permalink -}} {{- $template := resources.ExecuteAsTemplate - (print "/data/generates/content/" . "/media/" "_index.md") + (print "/data/generates/content/" $author "/media/" "_index.md") (dict - "author" . - "layout" "media" + "author" $author + "layout" "section.media" ) $markdown -}} - {{- $writeToFile := $template.RelPermalink -}} + {{- $writeToFile := $template.Permalink -}} {{- $template := resources.ExecuteAsTemplate - (print "/data/generates/content/" . "/likes/" "_index.md") + (print "/data/generates/content/" $author "/marks/" "_index.md") (dict - "author" . - "layout" "likes" + "author" $author + "layout" "section.marks" ) $markdown -}} - {{- $writeToFile := $template.RelPermalink -}} + {{- $writeToFile := $template.Permalink -}} {{- $template := resources.ExecuteAsTemplate - (print "/data/generates/content/" . "/drafts/" "_index.md") + (print "/data/generates/content/" $author "/drafts/" "_index.md") (dict - "author" . - "layout" "drafts" + "author" $author + "layout" "section.drafts" ) $markdown -}} - {{- $writeToFile := $template.RelPermalink -}} + {{- $writeToFile := $template.Permalink -}} {{- end -}} |