I just tried to update hugo to 0.140.2 using hugo-book theme and the server failed to start because of two deprecated features: resources.ToCSS
(use css.Sass
instead) and .Sites.First
(use .Sites.Default
instead).
I tried downloading extended binary for linux-64bit, linux-amd64, and withdeploy (not sure what withdeploy means?). They all fails for the same reason.
I cannot find the deprecated featues in the existing theme source code.
Thanks,
Dominck
You need to update the theme. They addressed the problem last year:
https://github.com/alex-shpak/hugo-book/pull/653
1 Like
Thanks, I updated the hugo-book theme, but that fixed only one of the two deprecation errors.
I still get an error about .Sites.First
that should be changed to .Sites.Default
instead.
I cannot find this used anywhere in the theme souce code, so I guess it must be compiled into the latest version of hugo?
A closer look at the hugo-book theme shows that it was tested with 0.134, so I installed 0.134.1 instead of 0.140.2, and that fixed both deprecation errors.
No.
Please log an issue with the theme author. In the interim, override the template:
mkdir -p layouts/partials
cp themes/hugo-book/layouts/partials/docs/brand.html layouts/partials/
and change line two:
<a class="flex align-center" href="{{ .Sites.Default.Home.RelPermalink }}">
1 Like
Confirmed, thanks. Version 0.40.2 works now.