diff options
| author | tdro <tdro@noreply.example.com> | 2024-09-20 00:00:00 +0000 |
|---|---|---|
| committer | tdro <tdro@noreply.example.com> | 2024-09-20 00:00:00 +0000 |
| commit | 322b28a459e264599f4d058dcea1cc3e973620d0 (patch) | |
| tree | 54ef064643bb0fd27e4d820e45766a79b8bc08d9 | |
| parent | 259e01f9ed5ff0281f03a70e15507174e0a1a258 (diff) | |
| download | canory-322b28a459e264599f4d058dcea1cc3e973620d0.tar.gz canory-322b28a459e264599f4d058dcea1cc3e973620d0.tar.bz2 canory-322b28a459e264599f4d058dcea1cc3e973620d0.zip | |
config/_default: Move deprecated .Site.Author
| -rw-r--r-- | config/_default/config.json | 20 | ||||
| -rw-r--r-- | config/_default/config.toml | 9 | ||||
| -rw-r--r-- | config/_default/config.yaml | 15 | ||||
| -rw-r--r-- | content/default/messages/create.md | 8 | ||||
| -rw-r--r-- | themes/default/layouts/partials/footer.html | 2 | ||||
| -rw-r--r-- | themes/default/layouts/partials/function-authors-slice.html | 2 | ||||
| -rw-r--r-- | themes/default/layouts/partials/generate-authors.html | 2 |
7 files changed, 28 insertions, 30 deletions
diff --git a/config/_default/config.json b/config/_default/config.json index fe7b5e6..14f6ee1 100644 --- a/config/_default/config.json +++ b/config/_default/config.json @@ -9,16 +9,6 @@ "buildExpired": true, "languageCode": "en-us", "enableRobotsTXT": true, - "author": { - "list": [ - "canory", - "default", - "nobody" - ], - "default": { - "footer": "A Micro Blog" - } - }, "taxonomies": { "tag": "tags" }, @@ -151,6 +141,16 @@ "msvalidate.01": null, "yandex-verification": null } + }, + "authors": { + "list": [ + "canory", + "default", + "nobody" + ], + "default": { + "footer": "A Micro Blog" + } } }, "related": { diff --git a/config/_default/config.toml b/config/_default/config.toml index 2839446..8389771 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -8,11 +8,6 @@ buildExpired = true languageCode = "en-us" enableRobotsTXT = true -[author] - list = ["canory", "default", "nobody"] - [author.default] - footer = "A Micro Blog" - [taxonomies] tag = "tags" @@ -99,6 +94,10 @@ enableRobotsTXT = true style-src = ["'self'", "'unsafe-inline'", "http://preview.test"] [params.search] [params.search.verification] + [params.authors] + list = ["canory", "default", "nobody"] + [params.authors.default] + footer = "A Micro Blog" [related] includeNewer = false diff --git a/config/_default/config.yaml b/config/_default/config.yaml index 233744c..da5ca71 100644 --- a/config/_default/config.yaml +++ b/config/_default/config.yaml @@ -11,14 +11,6 @@ buildExpired: true languageCode: en-us enableRobotsTXT: true -author: - list: - - canory - - default - - nobody - default: - footer: A Micro Blog - taxonomies: tag: tags @@ -95,6 +87,13 @@ params: google-site-verification: msvalidate.01: yandex-verification: + authors: + list: + - canory + - default + - nobody + default: + footer: A Micro Blog related: includeNewer: false diff --git a/content/default/messages/create.md b/content/default/messages/create.md index 96534c8..77c9439 100644 --- a/content/default/messages/create.md +++ b/content/default/messages/create.md @@ -4,12 +4,12 @@ lastmod = "2022-03-13T04:24:37+00:00" tags = [ "docs" ] +++ -"Bootstrap" authors by adding a name to the author list in the `toml/json/yaml` -configuration file. We tried to create a somebody but all we could muster was a -[nobody](/nobody). +"Bootstrap" authors by adding a name to the author's list in the +`toml/json/yaml` configuration file. We tried to create a somebody but all we +could muster was a [nobody](/nobody). ```yaml -author: +authors: list: - canory - default diff --git a/themes/default/layouts/partials/footer.html b/themes/default/layouts/partials/footer.html index 9007d3c..a848ef8 100644 --- a/themes/default/layouts/partials/footer.html +++ b/themes/default/layouts/partials/footer.html @@ -3,7 +3,7 @@ <footer> {{- if $kind -}} - {{- with $footer := (and $kind .Site.Author.default.footer) -}} + {{- with $footer := (and $kind .Site.Params.authors.default.footer) -}} {{ $footer | markdownify }} · Copyright © {{ now | time.Format "2006"}} · {{- end -}} diff --git a/themes/default/layouts/partials/function-authors-slice.html b/themes/default/layouts/partials/function-authors-slice.html index fc25554..0ec0ea1 100644 --- a/themes/default/layouts/partials/function-authors-slice.html +++ b/themes/default/layouts/partials/function-authors-slice.html @@ -1,6 +1,6 @@ {{- $authors := slice -}} -{{- range $user := .Site.Author.list -}} +{{- range $user := .Site.Params.authors.list -}} {{- with $author := index $.Site.Data.authors $user -}} {{- $authors = $authors | append $author.user -}} {{- end -}} diff --git a/themes/default/layouts/partials/generate-authors.html b/themes/default/layouts/partials/generate-authors.html index d1fc0c2..814ff30 100644 --- a/themes/default/layouts/partials/generate-authors.html +++ b/themes/default/layouts/partials/generate-authors.html @@ -1,4 +1,4 @@ -{{- range $author := .Site.Author.list -}} +{{- range $author := .Site.Params.authors.list -}} {{- if not (fileExists (print "data/authors/" $author ".yaml")) -}} |
