Fix Hugo v0.156.0 template deprecations

This commit is contained in:
Eric Gusmao committed 2026-04-03 14:13:30 -03:00
1 parent 9bcb7d37d3
commit ee2fc91522
10 files changed
+14 -10

No files matched your search

+5 -1
View File
@@ -3,7 +3,11 @@
{{ $compactSummary := .Get "compactSummary" | default false }}
{{ $target := .Page }}
{{ if ne $link .Page.RelPermalink }}
{{ $target = index (first 1 (where .Site.AllPages "RelPermalink" $link)) 0 }}
{{ $pages := slice }}
{{ range hugo.Sites }}
{{ $pages = $pages | append .Pages }}
{{ end }}
{{ $target = index (first 1 (where $pages "RelPermalink" $link)) 0 }}
{{ end }}
{{ if $target }}
<section class="space-y-10 w-full">
+1 -1
View File
@@ -1,6 +1,6 @@
{{ $id := delimit (slice "codeberg" (partial "functions/uid.html" .)) "-" }}
{{- $codebergURL := print "https://codeberg.org/api/v1/repos/" (.Get "repo") -}}
{{- $repoColors := .Site.Data.repoColors -}}
{{- $repoColors := hugo.Data.repoColors -}}
{{- $codebergData := dict -}}
{{- with try (resources.GetRemote $codebergURL) -}}
{{- with .Err -}}
+1 -1
View File
@@ -1,6 +1,6 @@
{{ $id := delimit (slice "forgejo" (partial "functions/uid.html" .)) "-" }}
{{- $forgejoURL := print (.Get "server" | default .Site.Params.forgejoDefaultServer) "/api/v1/repos/" (.Get "repo") -}}
{{- $repoColors := .Site.Data.repoColors -}}
{{- $repoColors := hugo.Data.repoColors -}}
{{- $forgejoData := dict -}}
{{- with try (resources.GetRemote $forgejoURL) -}}
{{- with .Err -}}
+1 -1
View File
@@ -1,6 +1,6 @@
{{ $id := delimit (slice "gitea" (partial "functions/uid.html" .)) "-" }}
{{- $giteaURL := print (.Get "server" | default .Site.Params.giteaDefaultServer) "/api/v1/repos/" (.Get "repo") -}}
{{- $repoColors := .Site.Data.repoColors -}}
{{- $repoColors := hugo.Data.repoColors -}}
{{- $giteaData := dict -}}
{{- with try (resources.GetRemote $giteaURL) -}}
{{- with .Err -}}
+1 -1
View File
@@ -2,7 +2,7 @@
{{- $githubURL := print "https://api.github.com/repos/" (.Get "repo") -}}
{{- $githubThumbnailURL := print "https://opengraph.githubassets.com/0/" (.Get "repo") -}}
{{- $showThumbnail := .Get "showThumbnail" | default true -}}
{{- $repoColors := .Site.Data.repoColors -}}
{{- $repoColors := hugo.Data.repoColors -}}
{{- $githubData := dict -}}
{{- with try (resources.GetRemote $githubURL) -}}
{{- with .Err -}}