From faf432751fd3e631e41bccacb8d0f24b57187425 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Tue, 19 Mar 2024 21:36:52 +0100 Subject: [PATCH 1/4] Example site: bump hugo modules to latest versions --- exampleSite/go.mod | 4 ++-- exampleSite/go.sum | 6 ++++-- exampleSite/{config.yaml => hugo.yaml} | 0 3 files changed, 6 insertions(+), 4 deletions(-) rename exampleSite/{config.yaml => hugo.yaml} (100%) diff --git a/exampleSite/go.mod b/exampleSite/go.mod index e2b9b7ccd..06dc58ffa 100644 --- a/exampleSite/go.mod +++ b/exampleSite/go.mod @@ -3,8 +3,8 @@ module github.com/hugo-toha/toha/exampleSite go 1.19 require ( - github.com/hugo-toha/hugo-toha.github.io v0.0.0-20231031082630-2c32a26d2207 // indirect - github.com/hugo-toha/toha/v4 v4.0.0-20231113175302-e5230e8c93d8 // indirect + github.com/hugo-toha/hugo-toha.github.io v0.0.0-20240319164719-d8a7e99b594d // indirect + github.com/hugo-toha/toha/v4 v4.4.0 // indirect ) replace github.com/hugo-toha/toha/v4 => ../ diff --git a/exampleSite/go.sum b/exampleSite/go.sum index 9101a35b7..77eca3cd6 100644 --- a/exampleSite/go.sum +++ b/exampleSite/go.sum @@ -1,2 +1,4 @@ -github.com/hugo-toha/hugo-toha.github.io v0.0.0-20231031082630-2c32a26d2207 h1:T71lEaGpHYpdy8yKM5vaVwm+CJGt8wjHvPgVM+GjCJM= -github.com/hugo-toha/hugo-toha.github.io v0.0.0-20231031082630-2c32a26d2207/go.mod h1:aTn1lQX1rbcbfbwNuWHG/L5DPtD+bEzQro49QyFlbEg= +github.com/hugo-toha/hugo-toha.github.io v0.0.0-20240319164719-d8a7e99b594d h1:TWNaAG2e1EZDvtl64fjyriR/qc8m7qaKnN13DgKzkFk= +github.com/hugo-toha/hugo-toha.github.io v0.0.0-20240319164719-d8a7e99b594d/go.mod h1:BRsZS1LeIc+eSM2OWSOeXDNeZUNRcTlJtw1bL874AfQ= +github.com/hugo-toha/toha/v4 v4.4.0 h1:RdRpjfsPgE+VXb/m3Rl+1n86pVZTrplsDvtXYK3wNh0= +github.com/hugo-toha/toha/v4 v4.4.0/go.mod h1:p/K34lqlqmhzfPd4cx66od7sjlROBqhMxG30mJz+aKQ= diff --git a/exampleSite/config.yaml b/exampleSite/hugo.yaml similarity index 100% rename from exampleSite/config.yaml rename to exampleSite/hugo.yaml From 56b053ca8e6f556d8f6a08a67a7460eabb38f1a5 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Tue, 19 Mar 2024 21:43:33 +0100 Subject: [PATCH 2/4] Fix deprecation warnings emitted by hugo v0.124 --- layouts/_default/list.html | 2 +- layouts/_default/rss.xml | 8 ++++---- layouts/_default/search.html | 2 +- layouts/categories/list.html | 2 +- layouts/notes/list.html | 2 +- layouts/notes/single.html | 2 +- layouts/partials/navigators/lang-selector.html | 2 +- layouts/tags/list.html | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9485de38b..80ef106da 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,7 +4,7 @@ {{ define "sidebar" }} {{ $homePage:="#" }} - {{ if site.IsMultiLingual }} + {{ if hugo.IsMultilingual }} {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ end }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 0e5e0d0c0..3c59b4307 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -19,9 +19,9 @@ {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} Hugo -- gohugo.io{{ with .Site.LanguageCode }} - {{.}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ with .Site.Params.Author.email }} + {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Params.Author.email }} + {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" -}} @@ -33,7 +33,7 @@ {{ .Title }} {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ with .Site.Params.Author.email }}{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }} {{ .Summary | html }} diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 9475868e8..fec3cfd35 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -4,7 +4,7 @@ {{ define "sidebar" }} {{ $homePage:="#" }} - {{ if site.IsMultiLingual }} + {{ if hugo.IsMultilingual }} {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ end }} diff --git a/layouts/categories/list.html b/layouts/categories/list.html index 5a79b8fd2..feca7bff4 100644 --- a/layouts/categories/list.html +++ b/layouts/categories/list.html @@ -4,7 +4,7 @@ {{ define "sidebar" }} {{ $homePage:="#" }} - {{ if site.IsMultiLingual }} + {{ if hugo.IsMultilingual }} {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ end }} diff --git a/layouts/notes/list.html b/layouts/notes/list.html index 4dea0f0f9..649229187 100644 --- a/layouts/notes/list.html +++ b/layouts/notes/list.html @@ -4,7 +4,7 @@ {{ define "sidebar" }} {{ $homePage:="#" }} - {{ if site.IsMultiLingual }} + {{ if hugo.IsMultilingual }} {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ end }} diff --git a/layouts/notes/single.html b/layouts/notes/single.html index c4a0bc525..6f5d35c72 100644 --- a/layouts/notes/single.html +++ b/layouts/notes/single.html @@ -4,7 +4,7 @@ {{ define "sidebar" }} {{ $homePage:="#" }} - {{ if site.IsMultiLingual }} + {{ if hugo.IsMultilingual }} {{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ end }} diff --git a/layouts/partials/navigators/lang-selector.html b/layouts/partials/navigators/lang-selector.html index 9232e446f..e038b3314 100644 --- a/layouts/partials/navigators/lang-selector.html +++ b/layouts/partials/navigators/lang-selector.html @@ -1,5 +1,5 @@ {{ $pageURL:= .RelPermalink }} -{{ if site.IsMultiLingual }} +{{ if hugo.IsMultilingual }} {{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }} {{ end }}