diff --git a/README.md b/README.md index 90f9a17b..39070ec9 100644 --- a/README.md +++ b/README.md @@ -411,6 +411,17 @@ link = "" # The reference for an anchor around the title. Example: "https://yout The assigned values shown are the default values. +Parameters specific to author term pages (if the "authors" taxonomy is configured): + +```toml +[paige.author] +email = "" # Example: example@example.com +name = "" # Example: John Doe +url = "" # Example: https://example.com +``` + +The assigned values shown are the default values. + Parameters specific to menus: ```toml diff --git a/exampleSite/content/authors/author-demo/_index.md b/exampleSite/content/authors/author-demo/_index.md index 1235fa47..dce25e7a 100644 --- a/exampleSite/content/authors/author-demo/_index.md +++ b/exampleSite/content/authors/author-demo/_index.md @@ -1,4 +1,8 @@ +++ description = "Demonstration of an author." title = "Author Demo" +[paige.author] +email = "example@example.com" +name = "Author Demo" +url = "https://example.com" +++ diff --git a/layouts/_default/list.atom.xml b/layouts/_default/list.atom.xml index 73d2020b..bc8efd7b 100644 --- a/layouts/_default/list.atom.xml +++ b/layouts/_default/list.atom.xml @@ -129,15 +129,15 @@ {{ with partial "paige/authors.html" . }} {{ range . }} - {{ with .Params.email }} + {{ with .Params.paige.author.email }} {{ . }} {{ end }} - {{ with .Params.Title }} + {{ with .Params.paige.author.name }} {{ . }} {{ end }} - {{ with .Params.url }} + {{ with .Params.paige.author.url }} {{ . }} {{ end }} diff --git a/layouts/_default/list.rss.xml b/layouts/_default/list.rss.xml index 7712c80c..ece7037e 100644 --- a/layouts/_default/list.rss.xml +++ b/layouts/_default/list.rss.xml @@ -103,8 +103,8 @@ {{ with $authors }} {{ $primary := index . 0 }} - {{ if and $primary.Params.email $primary.Title }} - {{ $author = printf "%s (%s)" $primary.Params.email $primary.Title }} + {{ if and $primary.Params.paige.author.email $primary.Params.paige.author.name }} + {{ $author = printf "%s (%s)" $primary.Params.paige.author.email $primary.Params.paige.author.name }} {{ else if $primary.Params.email }} {{ $author = $primary.Params.email }} {{ end }} diff --git a/layouts/partials/paige/schemas.html b/layouts/partials/paige/schemas.html index 8b7f2bb1..ac16bb9f 100644 --- a/layouts/partials/paige/schemas.html +++ b/layouts/partials/paige/schemas.html @@ -14,7 +14,7 @@ {{ if $auto }} {{ $audios := $page.Params.audio | default slice}} - {{ $authors := $page.GetTerms "authors" }} + {{ $authors := partial "paige/authors.html" $page }} {{ $images := $page.Params.images | default slice }} {{ $keywords := sort (union (union $page.Keywords $page.Params.tags) $page.Params.categories) }} {{ $license := $page.Param "paige.license" | markdownify | plainify }} @@ -51,9 +51,9 @@ {{ $authorObjects := slice }} {{ range $authors }} - {{ $authoremail := cond (. | not | not) .Params.email "" }} - {{ $authorname := cond (. | not | not) .Params.name "" }} - {{ $authorurl := cond (. | not | not) .Params.url "" }} + {{ $authoremail := cond (. | not | not) .Params.paige.author.email "" }} + {{ $authorname := cond (. | not | not) .Params.paige.author.name "" }} + {{ $authorurl := cond (. | not | not) .Params.paige.author.url "" }} {{ if or $authoremail $authorname $authorurl }} {{ $authorSchema := newScratch }}