From 4a1a7d716799f2e382ea14441f05ede2e5e5a11b Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Wed, 13 Mar 2024 21:15:32 +0100 Subject: [PATCH 1/2] Fix deprecation warning --- layouts/_default/baseof.html | 4 ++-- layouts/partials/google-analytics.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e759afb..474acbe 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -9,7 +9,7 @@ {{ block "meta_tags" . }}{{end}} - {{ if .Site.IsServer }} + {{ if hugo.IsServer }} {{ $style := resources.Get "scss/style.scss" | toCSS (dict "targetPath" "css/style.css" "enableSourceMap" true) }} {{ else }} @@ -60,7 +60,7 @@ {{ block "footer_js" . }} {{ end }} - {{ if .Site.IsServer }} + {{ if hugo.IsServer }} {{ else }} diff --git a/layouts/partials/google-analytics.html b/layouts/partials/google-analytics.html index 63c84ab..f4d7d73 100644 --- a/layouts/partials/google-analytics.html +++ b/layouts/partials/google-analytics.html @@ -1,4 +1,4 @@ -{{- if .Site.IsServer -}} +{{- if hugo.IsServer -}} {{ else }} {{ $gid := (getenv "HUGO_GOOGLE_ANALYTICS_ID") }} From 8c982a7455d544881d3bea6e137a6b574b9cb176 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Wed, 13 Mar 2024 21:20:05 +0100 Subject: [PATCH 2/2] Improve .gitignore --- .gitignore | 1 + .hugo_build.lock | 0 exampleSite/.hugo_build.lock | 0 netlify.toml | 2 +- 4 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 .hugo_build.lock delete mode 100644 exampleSite/.hugo_build.lock diff --git a/.gitignore b/.gitignore index 8069545..08c25d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.hugo_build.lock .DS_Store node_modules .idea diff --git a/.hugo_build.lock b/.hugo_build.lock deleted file mode 100644 index e69de29..0000000 diff --git a/exampleSite/.hugo_build.lock b/exampleSite/.hugo_build.lock deleted file mode 100644 index e69de29..0000000 diff --git a/netlify.toml b/netlify.toml index eedb34c..40ae8a9 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,6 +3,6 @@ command = "cd exampleSite && hugo --gc --themesDir ../.." [build.environment] - HUGO_VERSION = "0.80.0" + HUGO_VERSION = "0.123.8" HUGO_THEME = "repo" HUGO_BASEURL = "/" \ No newline at end of file