aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2020-04-28 22:00:24 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2020-04-28 22:00:24 +0200
commit2b430b0b4116ac0140ec501562ccf66ef297b86a (patch)
treea7e004d2e825b763c661de684081e0a1a87014eb
parent5be250b0e2e703a25f0db6c5081f60ba57e4bee5 (diff)
#212, Fix use of IsAncestor after hugo breaking change
-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) }}