From 7d7f267e49c889753f07060199a88d7de2ec0475 Mon Sep 17 00:00:00 2001 From: Scythemen <96688671+Scythemen@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:44:55 +0800 Subject: [PATCH 1/2] .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.141.0. Use hugo.IsMultilingual --- layouts/partials/widgets/languages.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/widgets/languages.html b/layouts/partials/widgets/languages.html index e54adb1e..3c20ab11 100644 --- a/layouts/partials/widgets/languages.html +++ b/layouts/partials/widgets/languages.html @@ -1,5 +1,5 @@ {{- $translations := .Site.Home.AllTranslations }} -{{- if and .Site.IsMultiLingual (gt (len $translations) 0) }} +{{- if and hugo.IsMultilingual (gt (len $translations) 0) }}

{{ T "languages_title" }}

From 3affa38a6a54907b972dd66336b4f859abf52e88 Mon Sep 17 00:00:00 2001 From: Scythemen <96688671+Scythemen@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:08:42 +0800 Subject: [PATCH 2/2] fixed upgrade to hugo 0.140 error --- layouts/partials/authorbox.html | 10 +++++----- layouts/partials/post_meta/author.html | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/layouts/partials/authorbox.html b/layouts/partials/authorbox.html index 20d6dfec..685272a2 100644 --- a/layouts/partials/authorbox.html +++ b/layouts/partials/authorbox.html @@ -1,21 +1,21 @@ {{- if .Param "authorbox" }}
- {{- if and (not .Site.Author.avatar) (not .Site.Author.name) (not .Site.Author.bio) }} + {{- if and (not .Site.Params.Author.avatar) (not .Site.Params.Author.name) (not .Site.Params.Author.bio) }}

WARNING: Authorbox is activated, but [Author] parameters are not specified.

{{- end }} - {{- with .Site.Author.avatar }} + {{- with .Site.Params.Author.avatar }}
- {{ $.Site.Author.name }} avatar + {{ $.Site.Params.Author.name }} avatar
{{- end }} - {{- with .Site.Author.name }} + {{- with .Site.Params.Author.name }}
{{ T "authorbox_name" (dict "Name" .) }}
{{- end }} - {{- with .Site.Author.bio }} + {{- with .Site.Params.Author.bio }}
{{ . | markdownify }}
diff --git a/layouts/partials/post_meta/author.html b/layouts/partials/post_meta/author.html index 0ee0fc93..d1a476ce 100644 --- a/layouts/partials/post_meta/author.html +++ b/layouts/partials/post_meta/author.html @@ -1,6 +1,6 @@ -{{- if .Site.Author.name -}} +{{- if .Site.Params.Author.name -}}
{{ partial "svg/author.svg" (dict "class" "meta__icon") -}} - {{ .Site.Author.name }} + {{ .Site.Params.Author.name }}
{{- end -}} \ No newline at end of file