From 24e60f6bc3cfe56a36553f128b4fefdd04d91e5e Mon Sep 17 00:00:00 2001 From: Igor Baiborodine Date: Sun, 18 Aug 2024 16:31:05 -0400 Subject: [PATCH] fix: issue-655 deprecated .Site.IsServer (#656) --- v4/layouts/partials/check-theme-prefer.html | 2 +- v4/layouts/partials/css.html | 2 +- v4/layouts/partials/js.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/v4/layouts/partials/check-theme-prefer.html b/v4/layouts/partials/check-theme-prefer.html index 0878cbbd..c6299b47 100644 --- a/v4/layouts/partials/check-theme-prefer.html +++ b/v4/layouts/partials/check-theme-prefer.html @@ -1,5 +1,5 @@ {{ $checkThemePrefer := resources.Get "js/check-theme-prefer.js" }} -{{ if or (.Site.IsServer) (eq hugo.Environment "development") }} +{{ if or (hugo.IsServer) (eq hugo.Environment "development") }} {{ else }} {{ $checkThemePrefer := $checkThemePrefer | resources.Minify | resources.Fingerprint }} diff --git a/v4/layouts/partials/css.html b/v4/layouts/partials/css.html index 5df6332f..631f6567 100644 --- a/v4/layouts/partials/css.html +++ b/v4/layouts/partials/css.html @@ -1,7 +1,7 @@ {{ $options := dict "targetPath" "theme.css" "enableSourceMap" true "precision" 6 }} {{ $css := resources.Get "sass/theme.scss" | resources.ExecuteAsTemplate "theme.scss" . | toCSS $options }} -{{ if or (.Site.IsServer) (eq hugo.Environment "development") }} +{{ if or (hugo.IsServer) (eq hugo.Environment "development") }} {{ else }} {{ $css := $css | resources.Minify | resources.Fingerprint }} diff --git a/v4/layouts/partials/js.html b/v4/layouts/partials/js.html index 67fd781a..fac25e0d 100644 --- a/v4/layouts/partials/js.html +++ b/v4/layouts/partials/js.html @@ -27,7 +27,7 @@ {{ $js := $jsToConcat | resources.Concat "theme.js" }} -{{ if or (.Site.IsServer) (eq hugo.Environment "development") }} +{{ if or (hugo.IsServer) (eq hugo.Environment "development") }} {{ else }} {{ $js := $js | resources.Minify | resources.Fingerprint }}