Skip to content

Commit

Permalink
Use hugo.IsServer
Browse files Browse the repository at this point in the history
  • Loading branch information
StefMa authored Oct 14, 2024
1 parent 344a72a commit ec4dc0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion layouts/partials/css.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{{- $inServerMode := (or hugo.IsServer .Site.IsServer) }}
{{- $inServerMode := "" }}
{{- if gt (int (index (split hugo.Version ".") 1)) "120" }}
{{ $inServerMode = hugo.IsServer }}
{{- else }}
{{ $inServerMode = .Site.IsServer }}
{{- end }}
{{- $sass := "style.sass" }}
{{- $cssTarget := "css/style.css" }}
{{- $cssOpts := cond ($inServerMode) (dict "targetPath" $cssTarget "enableSourceMap" true) (dict "targetPath" $cssTarget "outputStyle" "compressed") }}
Expand Down

0 comments on commit ec4dc0c

Please sign in to comment.