Move author config under paige.author

master
Will Faught 5 months ago
parent bcacae10c0
commit 4bc542b6b1

@ -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

@ -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"
+++

@ -129,15 +129,15 @@
{{ with partial "paige/authors.html" . }}
{{ range . }}
<author>
{{ with .Params.email }}
{{ with .Params.paige.author.email }}
<email>{{ . }}</email>
{{ end }}
{{ with .Params.Title }}
{{ with .Params.paige.author.name }}
<name>{{ . }}</name>
{{ end }}
{{ with .Params.url }}
{{ with .Params.paige.author.url }}
<uri>{{ . }}</uri>
{{ end }}
</author>

@ -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 }}

@ -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 }}

Loading…
Cancel
Save