Skip to content

Commit

Permalink
fix: issue-655 deprecated .Site.IsServer (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-baiborodine authored Aug 18, 2024
1 parent 60203bb commit 24e60f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion v4/layouts/partials/check-theme-prefer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ $checkThemePrefer := resources.Get "js/check-theme-prefer.js" }}
{{ if or (.Site.IsServer) (eq hugo.Environment "development") }}
{{ if or (hugo.IsServer) (eq hugo.Environment "development") }}
<script src="{{ $checkThemePrefer.Permalink }}"></script>
{{ else }}
{{ $checkThemePrefer := $checkThemePrefer | resources.Minify | resources.Fingerprint }}
Expand Down
2 changes: 1 addition & 1 deletion v4/layouts/partials/css.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ $options := dict "targetPath" "theme.css" "enableSourceMap" true "precision" 6 }}
{{ $css := resources.Get "sass/theme.scss" | resources.ExecuteAsTemplate "theme.scss" . | toCSS $options }}

{{ if or (.Site.IsServer) (eq hugo.Environment "development") }}
{{ if or (hugo.IsServer) (eq hugo.Environment "development") }}
<link id="theme-css" rel="stylesheet" href="{{ $css.Permalink }}" media="screen">
{{ else }}
{{ $css := $css | resources.Minify | resources.Fingerprint }}
Expand Down
2 changes: 1 addition & 1 deletion v4/layouts/partials/js.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

{{ $js := $jsToConcat | resources.Concat "theme.js" }}

{{ if or (.Site.IsServer) (eq hugo.Environment "development") }}
{{ if or (hugo.IsServer) (eq hugo.Environment "development") }}
<script src="{{ $js.Permalink }}"></script>
{{ else }}
{{ $js := $js | resources.Minify | resources.Fingerprint }}
Expand Down

0 comments on commit 24e60f6

Please sign in to comment.