Replace all site.Author* with site.Params.author*.

This commit is contained in:
Fredrik Jonsson 2024-03-16 20:59:18 +01:00
commit d292e993a1
3 changed files with 11 additions and 11 deletions

View file

@ -3,7 +3,7 @@
{ {
"version" : "https://jsonfeed.org/version/1", "version" : "https://jsonfeed.org/version/1",
"title" : "Micro posts {{ i18n "string_on" }} {{ site.Title }}", "title" : "Micro posts {{ i18n "string_on" }} {{ site.Title }}",
"description": "Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}", "description": "Micro blog {{ i18n "string_by" }} {{ with site.Params.author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}",
"home_page_url" : "{{ site.BaseURL }}", "home_page_url" : "{{ site.BaseURL }}",
{{ with .OutputFormats.Get "JSON" -}} {{ with .OutputFormats.Get "JSON" -}}
"feed_url" : "{{ .Permalink }}", "feed_url" : "{{ .Permalink }}",
@ -14,10 +14,10 @@
{{ with $.Param "favicon" -}} {{ with $.Param "favicon" -}}
"favicon" : "{{ . | absURL }}", "favicon" : "{{ . | absURL }}",
{{ end -}} {{ end -}}
{{ with site.Author.name -}} {{ with site.Params.author.name -}}
"author" : { "author" : {
"name" : "{{ . }}"{{ with site.Author.url }}, "name" : "{{ . }}"{{ with site.Params.author.url }},
"url": "{{ . }}"{{ end }}{{ with site.Author.avatar }}, "url": "{{ . }}"{{ end }}{{ with site.Params.author.avatar }},
"avatar": "{{ . | absURL }}"{{ end }} "avatar": "{{ . | absURL }}"{{ end }}
}, },
{{ end -}} {{ end -}}

View file

@ -2,16 +2,16 @@
<channel> <channel>
<title>Micro posts {{ i18n "string_on" }} {{ site.Title }}</title> <title>Micro posts {{ i18n "string_on" }} {{ site.Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}</description> <description>Micro blog {{ i18n "string_by" }} {{ with site.Params.author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}</description>
<generator>Hugo -- gohugo.io</generator> <generator>Hugo -- gohugo.io</generator>
{{ with site.LanguageCode -}} {{ with site.LanguageCode -}}
<language>{{ . }}</language> <language>{{ . }}</language>
{{ end -}} {{ end -}}
{{ with site.Author.email -}} {{ with site.Params.author.email -}}
<managingEditor>{{ . }}{{ with site.Author.name }} ({{ . }}){{ end }}</managingEditor> <managingEditor>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</managingEditor>
{{ end -}} {{ end -}}
{{ with site.Author.email -}} {{ with site.Params.author.email -}}
<webMaster>{{ . }}{{ with site.Author.name }} ({{ . }}){{ end }}</webMaster> <webMaster>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</webMaster>
{{ end -}} {{ end -}}
{{ with site.Copyright -}} {{ with site.Copyright -}}
<copyright>{{ . }}</copyright> <copyright>{{ . }}</copyright>

View file

@ -1,3 +1,3 @@
{{ with $.Param "author" | default site.Author.name }}<span class="author" itemprop="author">{{ . }}</span>{{ end -}} {{ with $.Param "author" | default site.Params.author.name }}<span class="author" itemprop="author">{{ . }}</span>{{ end -}}
{{ if and .Date (or ($.Param "author") site.Author.name) }} - {{ end -}} {{ if and .Date (or ($.Param "author") site.Params.author.name) }} - {{ end -}}
{{ with .Date }}<time class="created-date" datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ .Format ($.Param "dateformat" | default "2 January, 2006") }}</time>{{ end }} {{ with .Date }}<time class="created-date" datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ .Format ($.Param "dateformat" | default "2 January, 2006") }}</time>{{ end }}