#806, fix 0.156 deprecations

This commit is contained in:
Alex Shpak
2026-04-23 16:29:12 +02:00
parent 97d7ee40ed
commit ddc76d8885
6 changed files with 9 additions and 6 deletions
+1
View File
@@ -2,4 +2,5 @@ public/
exampleSite/public/ exampleSite/public/
.DS_Store .DS_Store
.hugo_build.lock .hugo_build.lock
.obsidian
resources/ resources/
+4 -2
View File
@@ -1,8 +1,10 @@
const cacheName = self.location.pathname const cacheName = self.location.pathname
const pages = [ const pages = [
{{ if eq .Site.Params.BookServiceWorker "precache" }} {{ if eq .Site.Params.BookServiceWorker "precache" }}
{{ range .Site.AllPages -}} {{ range hugo.Sites -}}
"{{ .RelPermalink }}", {{ range .Pages -}}
"{{ .RelPermalink }}",
{{ end -}}
{{ end -}} {{ end -}}
{{ range $permalink, $ok := site.Store.Get "book-sw-precache" -}} {{ range $permalink, $ok := site.Store.Get "book-sw-precache" -}}
"{{ $permalink }}", "{{ $permalink }}",
+1 -1
View File
@@ -1,3 +1,3 @@
module github.com/alex-shpak/hugo-book module github.com/alex-shpak/hugo-book
go 1.16 go 1.25
+1 -1
View File
@@ -1,5 +1,5 @@
<h2 class="book-brand"> <h2 class="book-brand">
<a class="flex align-center" href="{{ cond (not .Site.Home.File) .Sites.Default.Home.RelPermalink .Site.Home.RelPermalink }}"> <a class="flex align-center" href="{{ cond (not .Site.Home.File) hugo.Sites.Default.Home.RelPermalink .Site.Home.RelPermalink }}">
{{- with .Site.Params.BookLogo -}} {{- with .Site.Params.BookLogo -}}
<img src="{{ . | relURL }}" alt="{{ partial "docs/text/i18n" "Logo" }}" /> <img src="{{ . | relURL }}" alt="{{ partial "docs/text/i18n" "Logo" }}" />
{{- end -}} {{- end -}}
+1 -1
View File
@@ -21,7 +21,7 @@
</label> </label>
<ul> <ul>
{{ range .Site.Languages }}{{ with index $translations .Name }} {{ range hugo.Sites }}{{ with index $translations .Language.Name }}
<li> <li>
<a href="{{ cond hugo.IsMultihost .Permalink .RelPermalink }}" class="flex flex-auto"> <a href="{{ cond hugo.IsMultihost .Permalink .RelPermalink }}" class="flex flex-auto">
{{ .Language.Label }} {{ .Language.Label }}
+1 -1
View File
@@ -7,7 +7,7 @@ licenselink = "https://github.com/alex-shpak/hugo-book/blob/main/LICENSE"
description = "Hugo documentation theme as simple as plain book" description = "Hugo documentation theme as simple as plain book"
homepage = "https://github.com/alex-shpak/hugo-book" homepage = "https://github.com/alex-shpak/hugo-book"
demosite = "https://hugo-book-demo.netlify.app" demosite = "https://hugo-book-demo.netlify.app"
tags = ["responsive", "clean", "documentation", "docs", "flexbox", "search", "mobile", "multilingual", "disqus"] tags = ["responsive", "clean", "documentation", "docs", "search", "mobile", "multilingual"]
features = [] features = []
min_version = "0.158.0" min_version = "0.158.0"