diff --git a/layouts/partials/css.html b/layouts/partials/css.html
index 40c8e8cd..80d2ff2e 100644
--- a/layouts/partials/css.html
+++ b/layouts/partials/css.html
@@ -1,7 +1,7 @@
{{- $page := . -}}
-{{- $inServerMode := .Site.IsServer -}}
+{{- $inServerMode := hugo.IsServer -}}
{{- $serverOpts := cond ($inServerMode) (dict "enableSourceMap" true) (dict "outputStyle" "compressed") -}}
{{- $sassCompiler := dict "transpiler" "dartsass" -}}
{{- $cssOpts := collections.Merge $sassCompiler $serverOpts -}}
diff --git a/layouts/partials/javascript.html b/layouts/partials/javascript.html
index e9e718f0..084d7b5d 100644
--- a/layouts/partials/javascript.html
+++ b/layouts/partials/javascript.html
@@ -1,4 +1,4 @@
-{{- $inServerMode := .Site.IsServer -}}
+{{- $inServerMode := hugo.IsServer -}}