From 90e0fe6a0826ee61cd65cba9869aaea29df5808f Mon Sep 17 00:00:00 2001
From: Felix	Boerner <ich@felix-boerner.de>
Date: Sat, 01 Jun 2024 17:13:38 +0000
Subject: [PATCH] feat: use environment modes

---
 layouts/partials/head.html |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 9ef53f9..8687160 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -22,7 +22,7 @@
 {{ with .Site.Params.favicon }}<link rel="icon" href="{{ . | absURL }}" />{{ end }}
 
 <!-- Styles -->
-{{ if hugo.IsServer }}
+{{ if hugo.IsDevelopment }}
   {{ $cssOpts := (dict "targetPath" "css/split.css" "enableSourceMap" true ) }}
   {{ $styles := resources.Get "scss/split.scss" | resources.ExecuteAsTemplate "split.css" . | toCSS $cssOpts }}
   <link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen" />
@@ -38,6 +38,6 @@
 {{ end }}
 
 <!-- Google Analytics -->
-{{ if and (.Site.Config.Services.GoogleAnalytics.ID) (not (in (printf "%#v" .Site.BaseURL) "localhost")) }}
+{{ if and (.Site.Config.Services.GoogleAnalytics.ID) (not hugo.IsDevelopment) }}
   {{ template "_internal/google_analytics.html" . }}
 {{ end }}

--
Gitblit v1.10.0