From ddc76d8885c1760fafc5b5fdd3ebd124664f9014 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Thu, 23 Apr 2026 16:29:12 +0200 Subject: [PATCH] #806, fix 0.156 deprecations --- .gitignore | 1 + assets/sw.js | 6 ++++-- go.mod | 2 +- layouts/_partials/docs/brand.html | 2 +- layouts/_partials/docs/languages.html | 2 +- theme.toml | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f29c7d8..eebcb0a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ public/ exampleSite/public/ .DS_Store .hugo_build.lock +.obsidian resources/ diff --git a/assets/sw.js b/assets/sw.js index 3157db2..7fccece 100644 --- a/assets/sw.js +++ b/assets/sw.js @@ -1,8 +1,10 @@ const cacheName = self.location.pathname const pages = [ {{ if eq .Site.Params.BookServiceWorker "precache" }} - {{ range .Site.AllPages -}} - "{{ .RelPermalink }}", + {{ range hugo.Sites -}} + {{ range .Pages -}} + "{{ .RelPermalink }}", + {{ end -}} {{ end -}} {{ range $permalink, $ok := site.Store.Get "book-sw-precache" -}} "{{ $permalink }}", diff --git a/go.mod b/go.mod index 3e9c89b..eb8231b 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/alex-shpak/hugo-book -go 1.16 +go 1.25 diff --git a/layouts/_partials/docs/brand.html b/layouts/_partials/docs/brand.html index 3c2167a..26d0a5c 100644 --- a/layouts/_partials/docs/brand.html +++ b/layouts/_partials/docs/brand.html @@ -1,5 +1,5 @@

- + {{- with .Site.Params.BookLogo -}} {{ partial {{- end -}} diff --git a/layouts/_partials/docs/languages.html b/layouts/_partials/docs/languages.html index b2a8fa6..3c5e679 100644 --- a/layouts/_partials/docs/languages.html +++ b/layouts/_partials/docs/languages.html @@ -21,7 +21,7 @@