Move author config under paige.author
This commit is contained in:
11
README.md
11
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.
|
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:
|
Parameters specific to menus:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
|
@@ -1,4 +1,8 @@
|
|||||||
+++
|
+++
|
||||||
description = "Demonstration of an author."
|
description = "Demonstration of an author."
|
||||||
title = "Author Demo"
|
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" . }}
|
{{ with partial "paige/authors.html" . }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<author>
|
<author>
|
||||||
{{ with .Params.email }}
|
{{ with .Params.paige.author.email }}
|
||||||
<email>{{ . }}</email>
|
<email>{{ . }}</email>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Params.Title }}
|
{{ with .Params.paige.author.name }}
|
||||||
<name>{{ . }}</name>
|
<name>{{ . }}</name>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Params.url }}
|
{{ with .Params.paige.author.url }}
|
||||||
<uri>{{ . }}</uri>
|
<uri>{{ . }}</uri>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</author>
|
</author>
|
||||||
|
@@ -103,8 +103,8 @@
|
|||||||
{{ with $authors }}
|
{{ with $authors }}
|
||||||
{{ $primary := index . 0 }}
|
{{ $primary := index . 0 }}
|
||||||
|
|
||||||
{{ if and $primary.Params.email $primary.Title }}
|
{{ if and $primary.Params.paige.author.email $primary.Params.paige.author.name }}
|
||||||
{{ $author = printf "%s (%s)" $primary.Params.email $primary.Title }}
|
{{ $author = printf "%s (%s)" $primary.Params.paige.author.email $primary.Params.paige.author.name }}
|
||||||
{{ else if $primary.Params.email }}
|
{{ else if $primary.Params.email }}
|
||||||
{{ $author = $primary.Params.email }}
|
{{ $author = $primary.Params.email }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
{{ if $auto }}
|
{{ if $auto }}
|
||||||
{{ $audios := $page.Params.audio | default slice}}
|
{{ $audios := $page.Params.audio | default slice}}
|
||||||
{{ $authors := $page.GetTerms "authors" }}
|
{{ $authors := partial "paige/authors.html" $page }}
|
||||||
{{ $images := $page.Params.images | default slice }}
|
{{ $images := $page.Params.images | default slice }}
|
||||||
{{ $keywords := sort (union (union $page.Keywords $page.Params.tags) $page.Params.categories) }}
|
{{ $keywords := sort (union (union $page.Keywords $page.Params.tags) $page.Params.categories) }}
|
||||||
{{ $license := $page.Param "paige.license" | markdownify | plainify }}
|
{{ $license := $page.Param "paige.license" | markdownify | plainify }}
|
||||||
@@ -51,9 +51,9 @@
|
|||||||
{{ $authorObjects := slice }}
|
{{ $authorObjects := slice }}
|
||||||
|
|
||||||
{{ range $authors }}
|
{{ range $authors }}
|
||||||
{{ $authoremail := cond (. | not | not) .Params.email "" }}
|
{{ $authoremail := cond (. | not | not) .Params.paige.author.email "" }}
|
||||||
{{ $authorname := cond (. | not | not) .Params.name "" }}
|
{{ $authorname := cond (. | not | not) .Params.paige.author.name "" }}
|
||||||
{{ $authorurl := cond (. | not | not) .Params.url "" }}
|
{{ $authorurl := cond (. | not | not) .Params.paige.author.url "" }}
|
||||||
|
|
||||||
{{ if or $authoremail $authorname $authorurl }}
|
{{ if or $authoremail $authorname $authorurl }}
|
||||||
{{ $authorSchema := newScratch }}
|
{{ $authorSchema := newScratch }}
|
||||||
|
Reference in New Issue
Block a user