Skip to content

Commit

Permalink
Update for Hugo v0.120.0 or higher.
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsy committed Nov 11, 2024
1 parent 0b624aa commit 98521ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</script>

{{ $darkm := resources.Get "js/darkm.js" }}
{{- if .Site.IsServer }}
{{- if hugo.IsServer }}
{{ $style := resources.Get "scss/style.scss" | toCSS (dict "targetPath" "css/style.css" "enableSourceMap" true) }}
<script src="{{ $darkm.RelPermalink }}"></script>
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
Expand Down Expand Up @@ -63,7 +63,7 @@
{{ block "scripts" . }}{{ end }}
<!-- block additional scripts in templates -->

{{- if .Site.IsServer }}
{{- if hugo.IsServer }}
<script src="{{ $prefixFree.RelPermalink }}" defer="defer"></script>
{{- else }}
<script src="{{ ($prefixFree | minify | fingerprint).RelPermalink }}"></script>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/google-analytics.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Site.IsServer -}}
{{- if hugo.IsServer -}}
<!-- localhost: no ga -->
{{ else }}
{{ if .Site.Params.ga_id }}
Expand All @@ -10,4 +10,4 @@
gtag('config', '{{- .Site.Params.ga_id -}}');
</script>
{{ end}}
{{ end }}
{{ end }}

0 comments on commit 98521ed

Please sign in to comment.