Skip to content

Commit 686fbda

Browse files
committed
fix(template): .Site.Author -> .Site.Params.Author
Deprecated as of this commit: gohugoio/hugo@af5051e Fixes #154 Signed-off-by: Khusika Dhamar Gusti <khusikadhamar@gmail.com>
1 parent 22a01ed commit 686fbda

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

layouts/_partials/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
{{- /* Author */ -}}
3939
{{- if ne .Site.Params.footer.author false -}}
40-
<span class="author" itemprop="copyrightHolder">&nbsp;<a href="{{ $.Site.Author.link | default .Site.Home.RelPermalink }}">{{ .Site.Author.name }}</a></span>
40+
<span class="author" itemprop="copyrightHolder">&nbsp;<a href="{{ $.Site.Params.Author.link | default .Site.Home.RelPermalink }}">{{ .Site.Params.Author.name }}</a></span>
4141
{{- end -}}
4242

4343
{{- /* License */ -}}

layouts/_partials/head/seo.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{{- with .Site.LanguageCode -}}
2929
"inLanguage": "{{ . }}",
3030
{{- end -}}
31-
{{- with .Site.Author.name -}}
31+
{{- with .Site.Params.Author.name -}}
3232
"author": {
3333
"@type": "Person",
3434
"name": {{ . | safeHTML }}
@@ -124,7 +124,7 @@
124124
{{- with .Site.Copyright -}}
125125
"license": {{ . | safeHTML }},
126126
{{- end -}}
127-
{{- $publisher := .Params.author | default .Site.Author.name | default (T "author") | dict "name" -}}
127+
{{- $publisher := .Params.author | default .Site.Params.Author.name | default (T "author") | dict "name" -}}
128128
{{- $publisher = $params.seo.publisher | default dict | merge $publisher -}}
129129
"publisher": {
130130
"@type": "Organization",
@@ -143,7 +143,7 @@
143143
{{- end -}}
144144
{{- end -}}
145145
},
146-
{{- with .Params.author | default .Site.Author.name | default (T "author") -}}
146+
{{- with .Params.author | default .Site.Params.Author.name | default (T "author") -}}
147147
"author": {
148148
"@type": "Person",
149149
"name": {{ . | safeHTML }}

layouts/_partials/rss/item.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- $params := .Page.Params | merge .Site.Params.Page | merge (dict "author" .Site.Author.name) -}}
1+
{{- $params := .Page.Params | merge .Site.Params.Page | merge (dict "author" .Site.Params.Author.name) -}}
22
<item>
33
<title>
44
{{- .Page.Title -}}
@@ -9,9 +9,9 @@
99
<pubDate>
1010
{{- .Page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
1111
</pubDate>
12-
{{- with .Site.Author.email -}}
12+
{{- with .Site.Params.Author.email -}}
1313
<author>
14-
{{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
14+
{{- . }}{{ with $.Site.Params.Author.name }} ({{ . }}){{ end -}}
1515
</author>
1616
{{- end -}}
1717
<guid>

layouts/home.rss.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
{{- . -}}
1616
</language>
1717
{{- end -}}
18-
{{- with .Site.Author.email -}}
18+
{{- with .Site.Params.Author.email -}}
1919
<managingEditor>
20-
{{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
20+
{{- . }}{{ with $.Site.Params.Author.name }} ({{ . }}){{ end -}}
2121
</managingEditor>
2222
<webMaster>
23-
{{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
23+
{{- . }}{{ with $.Site.Params.Author.name }} ({{ . }}){{ end -}}
2424
</webMaster>
2525
{{- end -}}
2626
{{- with .Site.Copyright -}}

layouts/posts/single.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ <h2 class="single-subtitle">{{ . }}</h2>
5151
{{- /* Meta */ -}}
5252
<div class="post-meta">
5353
<div class="post-meta-line">
54-
{{- $author := .Params.author | default .Site.Author.name | default (T "author") -}}
55-
{{- $authorLink := .Params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
54+
{{- $author := .Params.author | default .Site.Params.Author.name | default (T "author") -}}
55+
{{- $authorLink := .Params.authorlink | default .Site.Params.Author.link | default .Site.Home.RelPermalink -}}
5656
<span class="post-author">
5757
{{- $avatar := "" -}}
5858
{{- with .Params.gravatarEmail -}}

layouts/summary.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ <h2 class="single-title" itemprop="name headline">
5555

5656
{{- /* Meta */ -}}
5757
<div class="post-meta">
58-
{{- $author := .Params.author | default .Site.Author.name | default (T "author") -}}
59-
{{- $authorLink := .Params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
58+
{{- $author := .Params.author | default .Site.Params.Author.name | default (T "author") -}}
59+
{{- $authorLink := .Params.authorlink | default .Site.Params.Author.link | default .Site.Home.RelPermalink -}}
6060
<span class="post-author">
6161
{{- $avatar := "" -}}
6262
{{- with .Params.gravatarEmail -}}

0 commit comments

Comments
 (0)