summaryrefslogtreecommitdiff
path: root/layouts/partials/docs/menu-filetree.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/docs/menu-filetree.html')
-rw-r--r--layouts/partials/docs/menu-filetree.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/docs/menu-filetree.html b/layouts/partials/docs/menu-filetree.html
index 4233a07..fcde91e 100644
--- a/layouts/partials/docs/menu-filetree.html
+++ b/layouts/partials/docs/menu-filetree.html
@@ -9,7 +9,7 @@
{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}}
{{ $self := eq .CurrentPage .Section }}
- {{ $ancestor := strings.HasPrefix .CurrentPage.RelPermalink .Section.RelPermalink }}
+ {{ $ancestor := .Section.IsAncestor .CurrentPage }}
{{ $collapsed := .Section.Params.bookCollapseSection }}
{{ if or $self $ancestor (not $collapsed) }}