diff --git a/layouts/_partials/docs/html-head.html b/layouts/_partials/docs/html-head.html
index 62156db..e1b007d 100644
--- a/layouts/_partials/docs/html-head.html
+++ b/layouts/_partials/docs/html-head.html
@@ -47,9 +47,8 @@ https://github.com/alex-shpak/hugo-book
{{ partial "google_analytics.html" . }}
-
-{{- with .OutputFormats.Get "rss" -}}
- {{ printf ` ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+{{- range .AlternativeOutputFormats -}}
+ {{ printf ` ` .Rel .MediaType.Type .Permalink $.Title | safeHTML }}
{{ end -}}
{{- define "integrity" -}}
diff --git a/layouts/_partials/docs/links/home.html b/layouts/_partials/docs/links/home.html
new file mode 100644
index 0000000..d45e3fc
--- /dev/null
+++ b/layouts/_partials/docs/links/home.html
@@ -0,0 +1 @@
+{{ return cond (not .Site.Home.File) hugo.Sites.Default.Home.RelPermalink .Site.Home.RelPermalink }}
\ No newline at end of file
diff --git a/layouts/_partials/docs/menu-filetree.html b/layouts/_partials/docs/menu-filetree.html
index 8bbbe4c..c8f3d03 100644
--- a/layouts/_partials/docs/menu-filetree.html
+++ b/layouts/_partials/docs/menu-filetree.html
@@ -1,9 +1,4 @@
-{{ $bookSection := default "docs" .Site.Params.BookSection }}
-{{ if eq $bookSection "*" }}
- {{ $bookSection = "/" }}{{/* Backward compatibility */}}
-{{ end }}
-
-{{ with .Site.GetPage $bookSection }}
+{{ with (partialCached "docs/menu-section" .Site) }}
{{ template "book-section-children" (dict "Section" . "CurrentPage" $) }}
{{ end }}
diff --git a/layouts/_partials/docs/menu-hugo.html b/layouts/_partials/docs/menu-hugo.html
index 7e22139..2f9bdff 100644
--- a/layouts/_partials/docs/menu-hugo.html
+++ b/layouts/_partials/docs/menu-hugo.html
@@ -1,7 +1,7 @@
-
+*/}}
{{- if .Menu -}}
{{- template "book-menu-hugo" . -}}
{{- end -}}
diff --git a/layouts/_partials/docs/menu-section-pages.html b/layouts/_partials/docs/menu-section-pages.html
new file mode 100644
index 0000000..e283166
--- /dev/null
+++ b/layouts/_partials/docs/menu-section-pages.html
@@ -0,0 +1,16 @@
+{{/* Recursively creates a slice of pages under given page */}}
+
+{{ define "book-menu-recurse" }}
+ {{ if not .Page.Params.BookHidden }}
+ {{ if .Page.Content }}
+ {{ .Scratch.Add "BookPages" (slice .Page) }}
+ {{ end }}
+ {{ range .Page.Pages }}
+ {{ template "book-menu-recurse" (dict "Scratch" $.Scratch "Page" .) }}
+ {{ end }}
+ {{ end }}
+{{ end }}
+
+{{ $scratch := newScratch }}
+{{ template "book-menu-recurse" (dict "Scratch" $scratch "Page" .) }}
+{{ return $scratch.Get "BookPages" }}
diff --git a/layouts/_partials/docs/menu-section.html b/layouts/_partials/docs/menu-section.html
new file mode 100644
index 0000000..24df7be
--- /dev/null
+++ b/layouts/_partials/docs/menu-section.html
@@ -0,0 +1,8 @@
+{{/* returns the section to be rendered as menu */}}
+{{ $bookSection := default "docs" .Params.BookSection }}
+{{ $section := .GetPage (cond (eq $bookSection "*") "/" $bookSection) }}
+{{ if $section }}
+ {{ return $section }}
+{{ else }}
+ {{ errorf "%s: Section '%s' not found, check BookSection theme parameter" $ $bookSection }}
+{{ end }}
diff --git a/layouts/_partials/docs/prev-next-cache.html b/layouts/_partials/docs/prev-next-cache.html
deleted file mode 100644
index 1561c06..0000000
--- a/layouts/_partials/docs/prev-next-cache.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{{ $scratch := newScratch }}
-{{ template "recurse" (dict "Scratch" $scratch "Sections" .) }}
-{{ define "recurse" }}
- {{ range .Sections }}
- {{ if and .Content (not .Params.BookHidden) }}
- {{ $.Scratch.Add "BookPages" (slice .) }}
- {{ end }}
- {{ if .IsSection }}
- {{ template "recurse" (dict "Scratch" $.Scratch "Sections" .Pages) }}
- {{ end }}
- {{ end }}
-{{ end }}
-
-{{ return $scratch.Get "BookPages" }}
diff --git a/layouts/_partials/docs/prev-next.html b/layouts/_partials/docs/prev-next.html
index 620bbe7..166eb3a 100644
--- a/layouts/_partials/docs/prev-next.html
+++ b/layouts/_partials/docs/prev-next.html
@@ -1,14 +1,9 @@
-{{ $bookSection := default "docs" .Site.Params.BookSection }}
-{{ if eq $bookSection "*" }}
- {{ $bookSection = "/" }}{{/* Backward compatibility */}}
-{{ end }}
+{{- with (partialCached "docs/menu-section" .Site) -}}
+ {{- $pages := partialCached "docs/menu-section-pages" . -}}
+ {{- $prev := $pages.Next $ -}}
+ {{- $next := $pages.Prev $ -}}
-{{ with .Site.GetPage $bookSection }}
- {{ $pages := partialCached "docs/prev-next-cache" .Pages }}
- {{ $prev := $pages.Next $ }}
- {{ $next := $pages.Prev $ }}
-
- {{- if or $prev $next }}
+ {{- if or $prev $next -}}
{{ with $prev }}
@@ -27,5 +22,5 @@
{{ end }}
- {{ end -}}
-{{ end }}
+ {{- end -}}
+{{- end -}}
diff --git a/layouts/_partials/docs/text/template.html b/layouts/_partials/docs/text/template.html
index 53e535d..7fd3685 100644
--- a/layouts/_partials/docs/text/template.html
+++ b/layouts/_partials/docs/text/template.html
@@ -1,8 +1,7 @@
-
-
+*/}}
{{- $checksum := . | encoding.Jsonify | crypto.SHA1 | printf "book-%s" -}}
{{- $template := resources.FromString $checksum .Template -}}
{{- $template = $template | resources.ExecuteAsTemplate $checksum .Context -}}
diff --git a/layouts/_partials/docs/title.html b/layouts/_partials/docs/title.html
index 83df5b6..a7ee61d 100644
--- a/layouts/_partials/docs/title.html
+++ b/layouts/_partials/docs/title.html
@@ -1,7 +1,7 @@
-
+*/}}
{{ $title := "" }}
{{ if .LinkTitle }}
diff --git a/layouts/_partials/docs/toc-show.html b/layouts/_partials/docs/toc-show.html
index d54c312..5cb882f 100644
--- a/layouts/_partials/docs/toc-show.html
+++ b/layouts/_partials/docs/toc-show.html
@@ -1,5 +1,4 @@
{{- return and
(not (eq .Params.bookToC false))
(not (eq .Site.Params.BookToC false))
- (not (eq .TableOfContents " "))
-}}
diff --git a/layouts/_shortcodes/columns.html b/layouts/_shortcodes/columns.html
index da2433c..a122062 100644
--- a/layouts/_shortcodes/columns.html
+++ b/layouts/_shortcodes/columns.html
@@ -1,6 +1,6 @@
{{- $ratio := (split (.Get "ratio") ":") -}}
{{- if strings.Contains .InnerDeindent "<--->" -}}
-{{- warnf "Columns shortcode separator '<--->' is deprecated, use markdown list instead." -}}
+{{- warnf "{{}} shortcode separator '<--->' is deprecated, use markdown list instead." -}}
{{- $attributes := partial "docs/text/mapper" (dict
"attributes" (cond .IsNamedParams .Params dict)
"merge" (dict
diff --git a/layouts/_shortcodes/hint.html b/layouts/_shortcodes/hint.html
index 8cec90b..f481e5b 100644
--- a/layouts/_shortcodes/hint.html
+++ b/layouts/_shortcodes/hint.html
@@ -1,4 +1,4 @@
-{{- warnf "Hint shortcode is deprecated, use markdown alerts format: '> [!NOTE] ...'" -}}
+{{- warnf "{{}} shortcode is deprecated, use markdown alerts format: '> [!NOTE] ...'" -}}
{{- $attributes := partial "docs/text/mapper" (dict
"attributes" (cond .IsNamedParams .Params dict)
"merge" (dict
diff --git a/layouts/_shortcodes/section.html b/layouts/_shortcodes/section.html
index cc0959e..029000a 100644
--- a/layouts/_shortcodes/section.html
+++ b/layouts/_shortcodes/section.html
@@ -1,4 +1,4 @@
-{{- warnf "Section shortcode is deprecated and will be removed" -}}
+{{- warnf "{{}} shortcode is deprecated and will be removed" -}}
{{ range .Page.Pages }}
diff --git a/layouts/all.txt b/layouts/all.txt
new file mode 100644
index 0000000..015075c
--- /dev/null
+++ b/layouts/all.txt
@@ -0,0 +1,7 @@
+{{ .Site.Title }}
+{{ $section := partialCached "docs/menu-section" .Site -}}
+{{- range (partialCached "docs/menu-section-pages" $section) }}
+- {{ partial "docs/title" . }}: {{ default .Permalink .Params.BookHref }}
+{{- end }}
+
+{{ .RawContent }}
diff --git a/layouts/baseof.html b/layouts/baseof.html
index d31cb74..d790b4d 100644
--- a/layouts/baseof.html
+++ b/layouts/baseof.html
@@ -64,7 +64,6 @@
{{ end }}
{{ define "clipboard" }}
-
{{ with resources.Get "clipboard.js" | resources.Minify }}
{{ end }}
diff --git a/layouts/book.html b/layouts/book.html
new file mode 100644
index 0000000..cdca061
--- /dev/null
+++ b/layouts/book.html
@@ -0,0 +1,30 @@
+{{ define "menu-container" }}
+
+{{ end }}
+
+{{ define "toc" }}
+ {{ partial "docs/brand" . }}
+
+
+ {{- $section := partialCached "docs/menu-section" .Site -}}
+ {{- range (partialCached "docs/menu-section-pages" $section) }}
+
+ {{ partial "docs/title" . }}
+
+ {{ end }}
+
+
+{{ end }}
+
+{{ define "footer" }}
+
+{{ end }}
+
+{{ define "main" }}
+
+ {{- $section := partialCached "docs/menu-section" .Site -}}
+ {{- range partialCached "docs/menu-section-pages" $section }}
+
+ {{ end }}
+
+{{ end }}
diff --git a/layouts/book.txt b/layouts/book.txt
new file mode 100644
index 0000000..28c01e0
--- /dev/null
+++ b/layouts/book.txt
@@ -0,0 +1,10 @@
+{{ .Site.Title }}
+{{ $section := partialCached "docs/menu-section" .Site -}}
+{{- range (partialCached "docs/menu-section-pages" $section) }}
+- {{ partial "docs/title" . }}: {{ default .Permalink .Params.BookHref }}
+{{- end }}
+
+{{ $section := partialCached "docs/menu-section" .Site -}}
+{{- range (partialCached "docs/menu-section-pages" $section) -}}
+ {{- .RawContent }}
+{{ end -}}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index 232e14e..864978a 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -16,4 +16,4 @@
{{ define "footer" }}
{{ partial "docs/post-prev-next" . }}
-{{ end }}
\ No newline at end of file
+{{ end }}