Skip to content

Commit 32710cd

Browse files
committed
chore: update author data references to use $hugo.Data instead of $.Site.Data
1 parent f4b61d1 commit 32710cd

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

layouts/_partials/head/seo.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@
118118
"author": [
119119
{{- $lang := ( $.Params.lang | default $.Lang ) -}}
120120
{{- range $i, $name := .Params.authors -}}
121-
{{- if $.Site.Data.authors -}}
122-
{{- with partial "function/author.html" (dict "name" $name "author" (index $.Site.Data.authors $name) "lang" $lang) -}}
121+
{{- if $hugo.Data.authors -}}
122+
{{- with partial "function/author.html" (dict "name" $name "author" (index $hugo.Data.authors $name) "lang" $lang) -}}
123123
{{- if gt $i 0 }},{{ end -}}
124124
{
125125
"@type": "Person",

layouts/_partials/meta/author.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<span class='author'>
99
<span class='screen-reader-text'> {{ i18n "by" }} </span>
1010
{{- range $i, $name := .Params.authors -}}
11-
{{- if $.Site.Data.authors -}}
11+
{{- if $hugo.Data.authors -}}
1212
{{- with partial "function/author.html" (dict
1313
"name" $name
14-
"author" (index $.Site.Data.authors $name)
14+
"author" (index $hugo.Data.authors $name)
1515
"lang" $lang
1616
) -}}
1717
{{- if gt $i 0 }}, {{ end -}}

layouts/_partials/rss/item.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
{{- if .Page.Params.authors -}}
2323
{{- $lang := ( .Page.Language.Lang | default $.Lang ) -}}
2424
{{- range $i, $name := .Page.Params.authors -}}
25-
{{- if $.Site.Data.authors -}}
26-
{{- with partial "function/author.html" (dict "name" $name "author" (index $.Site.Data.authors $name) "lang" $lang) -}}
25+
{{- if $hugo.Data.authors -}}
26+
{{- with partial "function/author.html" (dict "name" $name "author" (index $hugo.Data.authors $name) "lang" $lang) -}}
2727
<author>
2828
<name>{{- .name -}}</name>
2929
{{- if .absLink -}}

layouts/_partials/single/sponsor.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
{{- if $authors -}}
1515
{{- $lang := ( $.Params.lang | default $.Lang ) -}}
1616
{{- range $i, $name := $authors -}}
17-
{{- if $.Site.Data.authors -}}
17+
{{- if $hugo.Data.authors -}}
1818
{{- with partial "function/author.html" (dict
1919
"name" $name
20-
"author" (index $.Site.Data.authors $name)
20+
"author" (index $hugo.Data.authors $name)
2121
"lang" $lang) -}}
2222
{{- dict "Src" .avatar "Resources" $.Resources | partial "plugin/image.html" -}}
2323
{{- end -}}

layouts/term.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ <h2 class="single-title">
1919
{{ partial "plugin/fontawesome.html" (dict "Style" "solid" "Icon" "tag") }}&nbsp;{{ .Title }}
2020
{{- else if eq $taxonomy "author" -}}
2121
{{- .Scratch.Set "name" .Title -}}
22-
{{- if $.Site.Data.authors -}}
23-
{{- with partial "function/author.html" (dict "name" .Title "author" (index $.Site.Data.authors .Title) "lang" ($.Params.lang | default $.Lang)) -}}
22+
{{- if $hugo.Data.authors -}}
23+
{{- with partial "function/author.html" (dict "name" .Title "author" (index $hugo.Data.authors .Title) "lang" ($.Params.lang | default $.Lang)) -}}
2424
{{- .name | safeHTML -}}
2525
{{- if .avatar -}}
2626
<img src='{{ .avatar | absURL }}' alt='{{ .name }} avatar' class="tw-inline-block tw-max-h-8 tw-rounded-full tw-translate-y-[-2px] tw-ml-4"/>

0 commit comments

Comments
 (0)