summaryrefslogtreecommitdiffstats
path: root/layouts/_default/list.jsonfeed.json
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2024-09-29 15:54:01 +0200
committerSerghei Iakovlev <git@serghei.pl>2024-09-29 18:15:42 +0200
commit0882a21997b0830f43643cac9f0de4beaa698988 (patch)
tree581a1dea498805ef5b9259fbf095b5546d705a78 /layouts/_default/list.jsonfeed.json
parentec19cd59b5fc2ee4dc12b65647099c595984c075 (diff)
downloadgohugo-theme-ed-0882a21997b0830f43643cac9f0de4beaa698988.tar.gz
Rework author configuration
Diffstat (limited to 'layouts/_default/list.jsonfeed.json')
-rw-r--r--layouts/_default/list.jsonfeed.json19
1 files changed, 16 insertions, 3 deletions
diff --git a/layouts/_default/list.jsonfeed.json b/layouts/_default/list.jsonfeed.json
index 29c9bf4..d44c7e0 100644
--- a/layouts/_default/list.jsonfeed.json
+++ b/layouts/_default/list.jsonfeed.json
@@ -14,7 +14,20 @@
{{- $limit := site.Params.feedSize | default 25 -}}
{{- $pages = $pages | first $limit -}}
-{{- $siteAuthor := partial "site-author.html" . -}}
+{{- $authorName := "" }}
+{{- $authorTwitter := "" }}
+{{- with site.Params.author }}
+ {{- if reflect.IsMap . }}
+ {{- with .name }}
+ {{- $authorName = . }}
+ {{- end -}}
+ {{- with .twitter }}
+ {{- $authorTwitter = . }}
+ {{- end }}
+ {{- else }}
+ {{- $authorName = . }}
+ {{- end }}
+{{- end }}
{
"version": "https://jsonfeed.org/version/1.1",
@@ -25,9 +38,9 @@
{{- $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png") }}{{ $logo = $logo.Resize "96x96" }}
"icon": {{ $logo.Permalink | jsonify }},
"favicon": {{ $logo.Permalink | jsonify }},
- {{ with $siteAuthor.name }}"authors": [
+ {{ with $authorName }}"authors": [
{
- "name": {{ . | jsonify }}{{ with $siteAuthor.twitter }},
+ "name": {{ . | jsonify }}{{ with $authorTwitter }},
"url": {{ (printf "https://twitter.com/%s" . ) | jsonify }}{{ end }}
}
],{{ end }}