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) }}