Skip to content

Commit

Permalink
Replace all site.Author* with site.Params.author*.
Browse files Browse the repository at this point in the history
  • Loading branch information
frjo committed Mar 16, 2024
1 parent b9cabd2 commit d292e99
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions layouts/micro/list.json.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"version" : "https://jsonfeed.org/version/1",
"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 }}",
{{ with .OutputFormats.Get "JSON" -}}
"feed_url" : "{{ .Permalink }}",
Expand All @@ -14,10 +14,10 @@
{{ with $.Param "favicon" -}}
"favicon" : "{{ . | absURL }}",
{{ end -}}
{{ with site.Author.name -}}
{{ with site.Params.author.name -}}
"author" : {
"name" : "{{ . }}"{{ with site.Author.url }},
"url": "{{ . }}"{{ end }}{{ with site.Author.avatar }},
"name" : "{{ . }}"{{ with site.Params.author.url }},
"url": "{{ . }}"{{ end }}{{ with site.Params.author.avatar }},
"avatar": "{{ . | absURL }}"{{ end }}
},
{{ end -}}
Expand Down
10 changes: 5 additions & 5 deletions layouts/micro/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<channel>
<title>Micro posts {{ i18n "string_on" }} {{ site.Title }}</title>
<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>
{{ with site.LanguageCode -}}
<language>{{ . }}</language>
{{ end -}}
{{ with site.Author.email -}}
<managingEditor>{{ . }}{{ with site.Author.name }} ({{ . }}){{ end }}</managingEditor>
{{ with site.Params.author.email -}}
<managingEditor>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</managingEditor>
{{ end -}}
{{ with site.Author.email -}}
<webMaster>{{ . }}{{ with site.Author.name }} ({{ . }}){{ end }}</webMaster>
{{ with site.Params.author.email -}}
<webMaster>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</webMaster>
{{ end -}}
{{ with site.Copyright -}}
<copyright>{{ . }}</copyright>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/author-date.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ with $.Param "author" | default site.Author.name }}<span class="author" itemprop="author">{{ . }}</span>{{ end -}}
{{ if and .Date (or ($.Param "author") site.Author.name) }} - {{ end -}}
{{ with $.Param "author" | default site.Params.author.name }}<span class="author" itemprop="author">{{ . }}</span>{{ 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 }}

0 comments on commit d292e99

Please sign in to comment.