Skip to content

Commit c4bb9ab

Browse files
authored
Merge pull request #2887 from EricGusmao/fix/hugo-v0.156.0-deprecations
Fix Hugo v0.156.0 template deprecations
2 parents 15299c1 + b9ee790 commit c4bb9ab

11 files changed

Lines changed: 16 additions & 12 deletions

File tree

layouts/_default/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
9797
{{ end }}
9898

9999
{{ define "SingleAuthor" }}
100-
{{ $authorsData := site.Data.authors }}
100+
{{ $authorsData := hugo.Data.authors }}
101101
{{ $taxonomies := site.Taxonomies.authors }}
102102
{{ $baseURL := site.BaseURL }}
103103
{{ $taxonomyLink := 0 }}

layouts/partials/contributors.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ with site.Data.contributors }}
1+
{{ with hugo.Data.contributors }}
22
<section class="contributors-section mt-12 mb-16">
33
<div class="flex flex-col items-center mb-6">
44
<div class="flex items-center gap-2 mb-2">

layouts/partials/sharing-links.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }}
2-
{{ $links := site.Data.sharing }}
2+
{{ $links := hugo.Data.sharing }}
33
<section class="flex flex-row flex-wrap justify-center pt-4 text-xl">
44
{{ range . }}
55
{{ with index $links . }}

layouts/partials/sponsors.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ with site.Data.sponsors }}
1+
{{ with hugo.Data.sponsors }}
22
<section class="sponsors-section mt-16 mb-8">
33
<div class="flex flex-col items-center mb-6">
44
<div class="flex items-center gap-2 mb-2">

layouts/partials/vendor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
{{ end }}
125125

126126
{{ if $hasRepoCards }}
127-
{{ $repoColors := site.Data.repoColors }}
127+
{{ $repoColors := hugo.Data.repoColors }}
128128
{{ $cssRules := slice }}
129129

130130
{{/* default color */}}

layouts/shortcodes/article.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
{{ $compactSummary := .Get "compactSummary" | default false }}
44
{{ $target := .Page }}
55
{{ if ne $link .Page.RelPermalink }}
6-
{{ $target = index (first 1 (where .Site.AllPages "RelPermalink" $link)) 0 }}
6+
{{ $pages := slice }}
7+
{{ range hugo.Sites }}
8+
{{ $pages = $pages | append .Pages }}
9+
{{ end }}
10+
{{ $target = index (first 1 (where $pages "RelPermalink" $link)) 0 }}
711
{{ end }}
812
{{ if $target }}
913
<section class="space-y-10 w-full">

layouts/shortcodes/codeberg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ $id := delimit (slice "codeberg" (partial "functions/uid.html" .)) "-" }}
22
{{- $codebergURL := print "https://codeberg.org/api/v1/repos/" (.Get "repo") -}}
3-
{{- $repoColors := .Site.Data.repoColors -}}
3+
{{- $repoColors := hugo.Data.repoColors -}}
44
{{- $codebergData := dict -}}
55
{{- with try (resources.GetRemote $codebergURL) -}}
66
{{- with .Err -}}

layouts/shortcodes/forgejo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ $id := delimit (slice "forgejo" (partial "functions/uid.html" .)) "-" }}
22
{{- $forgejoURL := print (.Get "server" | default .Site.Params.forgejoDefaultServer) "/api/v1/repos/" (.Get "repo") -}}
3-
{{- $repoColors := .Site.Data.repoColors -}}
3+
{{- $repoColors := hugo.Data.repoColors -}}
44
{{- $forgejoData := dict -}}
55
{{- with try (resources.GetRemote $forgejoURL) -}}
66
{{- with .Err -}}

layouts/shortcodes/gitea.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ $id := delimit (slice "gitea" (partial "functions/uid.html" .)) "-" }}
22
{{- $giteaURL := print (.Get "server" | default .Site.Params.giteaDefaultServer) "/api/v1/repos/" (.Get "repo") -}}
3-
{{- $repoColors := .Site.Data.repoColors -}}
3+
{{- $repoColors := hugo.Data.repoColors -}}
44
{{- $giteaData := dict -}}
55
{{- with try (resources.GetRemote $giteaURL) -}}
66
{{- with .Err -}}

layouts/shortcodes/github.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{- $githubURL := print "https://api.github.com/repos/" (.Get "repo") -}}
33
{{- $githubThumbnailURL := print "https://opengraph.githubassets.com/0/" (.Get "repo") -}}
44
{{- $showThumbnail := .Get "showThumbnail" | default true -}}
5-
{{- $repoColors := .Site.Data.repoColors -}}
5+
{{- $repoColors := hugo.Data.repoColors -}}
66
{{- $githubData := dict -}}
77
{{- with try (resources.GetRemote $githubURL) -}}
88
{{- with .Err -}}

0 commit comments

Comments
 (0)