diff options
Diffstat (limited to 'layouts/partials/root-toc.html')
-rw-r--r-- | layouts/partials/root-toc.html | 8 |
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> |