diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 4035dd6b..e243b575 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -6,9 +6,11 @@
+ {{- if $.Site.Params.SetThemeAuto -}}
+ {{- end -}}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 91687be5..4b03bd03 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -32,5 +32,7 @@
{{- template "_internal/opengraph.html" . }}
{{- end }}
+{{- if $.Site.Params.SetThemeAuto -}}
{{ $settheme := resources.Get "set-theme.js" | minify }}
-
\ No newline at end of file
+
+{{- end -}}
\ No newline at end of file