Skip to content

Commit

Permalink
Replace usage of deprecated function .Site.IsServer
Browse files Browse the repository at this point in the history
  • Loading branch information
mfg92 committed Aug 31, 2024
1 parent 74a135b commit e2d1124
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/head/css.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ $bundleRaw := resources.Get "sass/style.scss" | resources.ExecuteAsTemplate "css/main.tmp.css" . }}

{{ if .Site.IsServer }}
{{ if hugo.IsServer }}
{{ $cssOpts := (dict "targetPath" "css/main.css" "enableSourceMap" true ) }}
{{ $bundle := $bundleRaw | toCSS $cssOpts }}
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" media="screen">
Expand All @@ -12,7 +12,7 @@
{{ end }}

<!-- Custom css -->
{{ if .Site.IsServer }}
{{ if hugo.IsServer }}
{{ range .Site.Params.customCSS -}}
{{ $style := resources.Get . }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" media="screen">
Expand Down

0 comments on commit e2d1124

Please sign in to comment.