From 561c0fa320805016557cff3e05ffa0a6a5e1f20d Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Thu, 30 Apr 2026 07:49:24 +0200 Subject: [PATCH] Fix Hugo v0.156+ deprecations: Site.Author, Site.Data, and libsass - Replace .Site.Author.{email,name} with .Site.Params.{social.email,author} in rss.xml - Replace .Site.Data with hugo.Data in footer, social, and contact-box templates - Switch SCSS transpiler from libsass to dartsass; add @use "sass:color" and replace darken()/lighten() with color.adjust() Co-Authored-By: Claude Sonnet 4.6 (1M context) --- themes/hugo-theme-ipng/assets/styles.scss | 5 +++-- themes/hugo-theme-ipng/layouts/_default/rss.xml | 10 +++++----- themes/hugo-theme-ipng/layouts/partials/footer.html | 2 +- themes/hugo-theme-ipng/layouts/partials/head.html | 2 +- .../layouts/shortcodes/contact-box.html | 2 +- themes/hugo-theme-ipng/layouts/shortcodes/social.html | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/themes/hugo-theme-ipng/assets/styles.scss b/themes/hugo-theme-ipng/assets/styles.scss index 95ec6ed..b295c1c 100644 --- a/themes/hugo-theme-ipng/assets/styles.scss +++ b/themes/hugo-theme-ipng/assets/styles.scss @@ -1,3 +1,4 @@ +@use "sass:color"; // Colors $midnight-blue: #07608f; $midnight-matte: #4c7e99; @@ -763,7 +764,7 @@ table { border: 2px solid $ipng-orange; tr { &:nth-child(even) { - background-color: darken($table-cell-background, 10%); + background-color: color.adjust($table-cell-background, $lightness: -10%); } } th, td { @@ -771,7 +772,7 @@ table { } th { color: $ipng-orange; - background-color: lighten($table-header-background, 3%); + background-color: color.adjust($table-header-background, $lightness: 3%); border-bottom: 3px solid $ipng-orange; font-weight: bold; } diff --git a/themes/hugo-theme-ipng/layouts/_default/rss.xml b/themes/hugo-theme-ipng/layouts/_default/rss.xml index 1a9f458..6d785ea 100644 --- a/themes/hugo-theme-ipng/layouts/_default/rss.xml +++ b/themes/hugo-theme-ipng/layouts/_default/rss.xml @@ -9,14 +9,14 @@ {{.}} {{end}} - {{ with .Site.Author.email }} + {{ with .Site.Params.social.email }} {{.}} - {{ with $.Site.Author.name }} ({{.}}){{end}} + {{ with $.Site.Params.author }} ({{.}}){{end}} {{end}} - {{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} + {{ with .Site.Params.social.email }} + {{.}}{{ with $.Site.Params.author }} ({{.}}){{end}} {{end}} @@ -38,7 +38,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.social.email }}{{.}}{{ with $.Site.Params.author }} ({{.}}){{end}}{{end}} {{ .Permalink }} {{ .Summary | markdownify }} diff --git a/themes/hugo-theme-ipng/layouts/partials/footer.html b/themes/hugo-theme-ipng/layouts/partials/footer.html index 13746a1..8303bbb 100644 --- a/themes/hugo-theme-ipng/layouts/partials/footer.html +++ b/themes/hugo-theme-ipng/layouts/partials/footer.html @@ -1,6 +1,6 @@