about summary refs log tree commit diff
path: root/layouts/partials/root-toc.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/root-toc.html')
-rw-r--r--layouts/partials/root-toc.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/layouts/partials/root-toc.html b/layouts/partials/root-toc.html
new file mode 100644
index 0000000..2792ce9
--- /dev/null
+++ b/layouts/partials/root-toc.html
@@ -0,0 +1,8 @@
+	<details class="toc-collapse">
+		<summary>{{ i18n "toc" }}</summary>
+		{{ $currentLink := .RelPermalink }}
+		{{ range last 1 (where .Ancestors "Params.categories" "intersect" (slice "book") ) }}
+		<a href="{{ .RelPermalink }}">{{ .Title }}</a>
+		{{ partial "toc.html" (dict "content" . "currentLink" $currentLink) }}
+		{{ end }}
+	</details>