From 9b5f3fad7068298265dbbc8a65077f7917a090a5 Mon Sep 17 00:00:00 2001 From: aethrvmn Date: Sun, 21 Sep 2025 00:27:35 +0200 Subject: updated hugo-book theme --- themes/hugo-book/layouts/partials/docs/brand.html | 8 ---- .../hugo-book/layouts/partials/docs/comments.html | 2 - themes/hugo-book/layouts/partials/docs/date.html | 6 --- themes/hugo-book/layouts/partials/docs/footer.html | 27 ----------- themes/hugo-book/layouts/partials/docs/header.html | 13 ----- .../layouts/partials/docs/html-head-favicon.html | 1 - .../layouts/partials/docs/html-head-title.html | 1 - .../hugo-book/layouts/partials/docs/html-head.html | 56 ---------------------- .../layouts/partials/docs/inject/body.html | 0 .../partials/docs/inject/content-after.html | 0 .../partials/docs/inject/content-before.html | 0 .../layouts/partials/docs/inject/footer.html | 0 .../layouts/partials/docs/inject/head.html | 0 .../layouts/partials/docs/inject/menu-after.html | 0 .../layouts/partials/docs/inject/menu-before.html | 0 .../layouts/partials/docs/inject/toc-after.html | 0 .../layouts/partials/docs/inject/toc-before.html | 0 .../hugo-book/layouts/partials/docs/languages.html | 33 ------------- .../layouts/partials/docs/links/commit.html | 2 - .../layouts/partials/docs/links/edit.html | 2 - .../layouts/partials/docs/menu-filetree.html | 49 ------------------- .../hugo-book/layouts/partials/docs/menu-hugo.html | 28 ----------- themes/hugo-book/layouts/partials/docs/menu.html | 21 -------- .../hugo-book/layouts/partials/docs/post-meta.html | 16 ------- themes/hugo-book/layouts/partials/docs/search.html | 8 ---- .../hugo-book/layouts/partials/docs/taxonomy.html | 19 -------- themes/hugo-book/layouts/partials/docs/title.html | 17 ------- themes/hugo-book/layouts/partials/docs/toc.html | 3 -- 28 files changed, 312 deletions(-) delete mode 100644 themes/hugo-book/layouts/partials/docs/brand.html delete mode 100644 themes/hugo-book/layouts/partials/docs/comments.html delete mode 100644 themes/hugo-book/layouts/partials/docs/date.html delete mode 100644 themes/hugo-book/layouts/partials/docs/footer.html delete mode 100644 themes/hugo-book/layouts/partials/docs/header.html delete mode 100644 themes/hugo-book/layouts/partials/docs/html-head-favicon.html delete mode 100644 themes/hugo-book/layouts/partials/docs/html-head-title.html delete mode 100644 themes/hugo-book/layouts/partials/docs/html-head.html delete mode 100644 themes/hugo-book/layouts/partials/docs/inject/body.html delete mode 100644 themes/hugo-book/layouts/partials/docs/inject/content-after.html delete mode 100644 themes/hugo-book/layouts/partials/docs/inject/content-before.html delete mode 100644 themes/hugo-book/layouts/partials/docs/inject/footer.html delete mode 100644 themes/hugo-book/layouts/partials/docs/inject/head.html delete mode 100644 themes/hugo-book/layouts/partials/docs/inject/menu-after.html delete mode 100644 themes/hugo-book/layouts/partials/docs/inject/menu-before.html delete mode 100644 themes/hugo-book/layouts/partials/docs/inject/toc-after.html delete mode 100644 themes/hugo-book/layouts/partials/docs/inject/toc-before.html delete mode 100644 themes/hugo-book/layouts/partials/docs/languages.html delete mode 100644 themes/hugo-book/layouts/partials/docs/links/commit.html delete mode 100644 themes/hugo-book/layouts/partials/docs/links/edit.html delete mode 100644 themes/hugo-book/layouts/partials/docs/menu-filetree.html delete mode 100644 themes/hugo-book/layouts/partials/docs/menu-hugo.html delete mode 100644 themes/hugo-book/layouts/partials/docs/menu.html delete mode 100644 themes/hugo-book/layouts/partials/docs/post-meta.html delete mode 100644 themes/hugo-book/layouts/partials/docs/search.html delete mode 100644 themes/hugo-book/layouts/partials/docs/taxonomy.html delete mode 100644 themes/hugo-book/layouts/partials/docs/title.html delete mode 100644 themes/hugo-book/layouts/partials/docs/toc.html (limited to 'themes/hugo-book/layouts/partials') diff --git a/themes/hugo-book/layouts/partials/docs/brand.html b/themes/hugo-book/layouts/partials/docs/brand.html deleted file mode 100644 index fa7f415..0000000 --- a/themes/hugo-book/layouts/partials/docs/brand.html +++ /dev/null @@ -1,8 +0,0 @@ -

- - {{- with .Site.Params.BookLogo -}} - Logo - {{- end -}} - {{ .Site.Title }} - -

diff --git a/themes/hugo-book/layouts/partials/docs/comments.html b/themes/hugo-book/layouts/partials/docs/comments.html deleted file mode 100644 index 59c5f22..0000000 --- a/themes/hugo-book/layouts/partials/docs/comments.html +++ /dev/null @@ -1,2 +0,0 @@ - -{{ template "_internal/disqus.html" . }} diff --git a/themes/hugo-book/layouts/partials/docs/date.html b/themes/hugo-book/layouts/partials/docs/date.html deleted file mode 100644 index 8c75361..0000000 --- a/themes/hugo-book/layouts/partials/docs/date.html +++ /dev/null @@ -1,6 +0,0 @@ - -{{- $format := default "January 2, 2006" .Format -}} -{{- return (time.Format $format .Date) -}} diff --git a/themes/hugo-book/layouts/partials/docs/footer.html b/themes/hugo-book/layouts/partials/docs/footer.html deleted file mode 100644 index 77e96d8..0000000 --- a/themes/hugo-book/layouts/partials/docs/footer.html +++ /dev/null @@ -1,27 +0,0 @@ -
- -{{ if and .GitInfo .Site.Params.BookRepo }} -
- {{- $date := partial "docs/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}} - - - {{ $date }} - -
-{{ end }} - -{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }} -
- - - {{ i18n "Edit this page" }} - -
-{{ end }} - -
- -{{ $script := resources.Get "clipboard.js" | resources.Minify }} -{{ with $script.Content }} - -{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/header.html b/themes/hugo-book/layouts/partials/docs/header.html deleted file mode 100644 index 646b8ff..0000000 --- a/themes/hugo-book/layouts/partials/docs/header.html +++ /dev/null @@ -1,13 +0,0 @@ -
- - -

{{ partial "docs/title" . }}

- - -
diff --git a/themes/hugo-book/layouts/partials/docs/html-head-favicon.html b/themes/hugo-book/layouts/partials/docs/html-head-favicon.html deleted file mode 100644 index 8278050..0000000 --- a/themes/hugo-book/layouts/partials/docs/html-head-favicon.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/themes/hugo-book/layouts/partials/docs/html-head-title.html b/themes/hugo-book/layouts/partials/docs/html-head-title.html deleted file mode 100644 index 49a109d..0000000 --- a/themes/hugo-book/layouts/partials/docs/html-head-title.html +++ /dev/null @@ -1 +0,0 @@ -{{ partial "docs/title" . }} | {{ .Site.Title -}} diff --git a/themes/hugo-book/layouts/partials/docs/html-head.html b/themes/hugo-book/layouts/partials/docs/html-head.html deleted file mode 100644 index 6a6d0ec..0000000 --- a/themes/hugo-book/layouts/partials/docs/html-head.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - -{{- with .Page.Params.BookHref -}} - -{{- end -}} - -{{- template "_internal/opengraph.html" . -}} - -{{ partial "docs/html-head-title" . }} -{{ partial "docs/html-head-favicon" . }} - -{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }} - - - -{{- range .Translations }} - -{{- end -}} - - -{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | css.Sass | resources.Minify | resources.Fingerprint }} - -{{- if default true .Site.Params.BookSearch -}} - {{- $searchJSFile := printf "%s.search.js" .Language.Lang }} - {{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }} - - -{{ end -}} - -{{- if .Site.Params.BookServiceWorker -}} - {{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }} - -{{ end -}} - -{{- template "_internal/google_analytics.html" . -}} - - -{{- with .OutputFormats.Get "rss" -}} - {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} -{{ end -}} - -{{ "" | safeHTML }} - -{{- define "integrity" -}} - {{- if (urls.Parse .Permalink).Host -}} - integrity="{{ .Data.Integrity }}" crossorigin="anonymous" - {{- end -}} -{{- end -}} diff --git a/themes/hugo-book/layouts/partials/docs/inject/body.html b/themes/hugo-book/layouts/partials/docs/inject/body.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/hugo-book/layouts/partials/docs/inject/content-after.html b/themes/hugo-book/layouts/partials/docs/inject/content-after.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/hugo-book/layouts/partials/docs/inject/content-before.html b/themes/hugo-book/layouts/partials/docs/inject/content-before.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/hugo-book/layouts/partials/docs/inject/footer.html b/themes/hugo-book/layouts/partials/docs/inject/footer.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/hugo-book/layouts/partials/docs/inject/head.html b/themes/hugo-book/layouts/partials/docs/inject/head.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/hugo-book/layouts/partials/docs/inject/menu-after.html b/themes/hugo-book/layouts/partials/docs/inject/menu-after.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/hugo-book/layouts/partials/docs/inject/menu-before.html b/themes/hugo-book/layouts/partials/docs/inject/menu-before.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/hugo-book/layouts/partials/docs/inject/toc-after.html b/themes/hugo-book/layouts/partials/docs/inject/toc-after.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/hugo-book/layouts/partials/docs/inject/toc-before.html b/themes/hugo-book/layouts/partials/docs/inject/toc-before.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/hugo-book/layouts/partials/docs/languages.html b/themes/hugo-book/layouts/partials/docs/languages.html deleted file mode 100644 index 51aabdd..0000000 --- a/themes/hugo-book/layouts/partials/docs/languages.html +++ /dev/null @@ -1,33 +0,0 @@ - -{{ $bookTranslatedOnly := default false .Site.Params.BookTranslatedOnly }} -{{ $translations := dict }} -{{ if (eq $bookTranslatedOnly false ) }} - {{ range .Site.Home.Translations }} - {{ $translations = merge $translations (dict .Language.Lang .) }} - {{ end }} -{{ end }} -{{ range .Translations }} - {{ $translations = merge $translations (dict .Language.Lang .) }} -{{ end }} - - diff --git a/themes/hugo-book/layouts/partials/docs/links/commit.html b/themes/hugo-book/layouts/partials/docs/links/commit.html deleted file mode 100644 index 8ab9334..0000000 --- a/themes/hugo-book/layouts/partials/docs/links/commit.html +++ /dev/null @@ -1,2 +0,0 @@ -{{- $commitPath := default "commit" .Site.Params.BookCommitPath -}} -{{- .Site.Params.BookRepo }}/{{ $commitPath }}/{{ .GitInfo.Hash -}} \ No newline at end of file diff --git a/themes/hugo-book/layouts/partials/docs/links/edit.html b/themes/hugo-book/layouts/partials/docs/links/edit.html deleted file mode 100644 index 920affa..0000000 --- a/themes/hugo-book/layouts/partials/docs/links/edit.html +++ /dev/null @@ -1,2 +0,0 @@ -{{- $bookFilePath := (strings.TrimPrefix hugo.WorkingDir .Page.File.Filename | path.Join) -}} -{{- .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}{{ ($bookFilePath) -}} \ No newline at end of file diff --git a/themes/hugo-book/layouts/partials/docs/menu-filetree.html b/themes/hugo-book/layouts/partials/docs/menu-filetree.html deleted file mode 100644 index 1494588..0000000 --- a/themes/hugo-book/layouts/partials/docs/menu-filetree.html +++ /dev/null @@ -1,49 +0,0 @@ -{{ $bookSection := default "docs" .Site.Params.BookSection }} -{{ if eq $bookSection "*" }} - {{ $bookSection = "/" }}{{/* Backward compatibility */}} -{{ end }} - -{{ with .Site.GetPage $bookSection }} - {{ template "book-section-children" (dict "Section" . "CurrentPage" $) }} -{{ end }} - -{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}} - -{{ end }} - -{{ define "book-page-link" }}{{/* (dict "Page" .Page "CurrentPage" .CurrentPage) */}} - {{ $current := eq .CurrentPage .Page }} - {{ $ancestor := .Page.IsAncestor .CurrentPage }} - - {{ if .Page.Params.BookCollapseSection }} - - - {{ else if .Page.Params.BookHref }} - - {{- partial "docs/title" .Page -}} - - {{ else if .Page.Content }} - - {{- partial "docs/title" .Page -}} - - {{ else }} - {{- partial "docs/title" .Page -}} - {{ end }} -{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/menu-hugo.html b/themes/hugo-book/layouts/partials/docs/menu-hugo.html deleted file mode 100644 index 5f01be0..0000000 --- a/themes/hugo-book/layouts/partials/docs/menu-hugo.html +++ /dev/null @@ -1,28 +0,0 @@ - -{{ if . }} - {{ template "book-menu-hugo" . }} -{{ end }} - -{{ define "book-menu-hugo" }} - -{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/menu.html b/themes/hugo-book/layouts/partials/docs/menu.html deleted file mode 100644 index dbb2e49..0000000 --- a/themes/hugo-book/layouts/partials/docs/menu.html +++ /dev/null @@ -1,21 +0,0 @@ - - - -{{ $script := resources.Get "menu-reset.js" | resources.Minify }} -{{ with $script.Content }} - -{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/post-meta.html b/themes/hugo-book/layouts/partials/docs/post-meta.html deleted file mode 100644 index 457e2c0..0000000 --- a/themes/hugo-book/layouts/partials/docs/post-meta.html +++ /dev/null @@ -1,16 +0,0 @@ -{{ with .Date }} -
- - {{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }} -
-{{ end }} - -{{ range $taxonomy, $_ := .Site.Taxonomies }} - {{ with $terms := $.GetTerms $taxonomy }} -
- {{ range $n, $term := $terms }}{{ if $n }}, {{ end }} - {{ $term.Title }} - {{- end }} -
- {{ end }} -{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/search.html b/themes/hugo-book/layouts/partials/docs/search.html deleted file mode 100644 index 937f595..0000000 --- a/themes/hugo-book/layouts/partials/docs/search.html +++ /dev/null @@ -1,8 +0,0 @@ -{{ if default true .Site.Params.BookSearch }} - - -{{ end }} diff --git a/themes/hugo-book/layouts/partials/docs/taxonomy.html b/themes/hugo-book/layouts/partials/docs/taxonomy.html deleted file mode 100644 index 63ef315..0000000 --- a/themes/hugo-book/layouts/partials/docs/taxonomy.html +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/themes/hugo-book/layouts/partials/docs/title.html b/themes/hugo-book/layouts/partials/docs/title.html deleted file mode 100644 index 83df5b6..0000000 --- a/themes/hugo-book/layouts/partials/docs/title.html +++ /dev/null @@ -1,17 +0,0 @@ - -{{ $title := "" }} - -{{ if .LinkTitle }} - {{ $title = .LinkTitle }} -{{ else if .Title }} - {{ $title = .Title }} -{{ else if and .IsSection .File }} - {{ $title = path.Base .File.Dir | humanize | title }} -{{ else if and .IsPage .File }} - {{ $title = .File.BaseFileName | humanize | title }} -{{ end }} - -{{ return $title }} diff --git a/themes/hugo-book/layouts/partials/docs/toc.html b/themes/hugo-book/layouts/partials/docs/toc.html deleted file mode 100644 index 64697a4..0000000 --- a/themes/hugo-book/layouts/partials/docs/toc.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ partial "docs/inject/toc-before" . }} -{{ .TableOfContents }} -{{ partial "docs/inject/toc-after" . }} -- cgit v1.2.3