#212, Fix use of IsAncestor after hugo breaking change

This commit is contained in:
Alex Shpak 2020-04-28 22:00:24 +02:00
parent 5be250b0e2
commit 2b430b0b41

View file

@ -9,7 +9,7 @@
{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}} {{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}}
{{ $self := eq .CurrentPage .Section }} {{ $self := eq .CurrentPage .Section }}
{{ $ancestor := strings.HasPrefix .CurrentPage.RelPermalink .Section.RelPermalink }} {{ $ancestor := .Section.IsAncestor .CurrentPage }}
{{ $collapsed := .Section.Params.bookCollapseSection }} {{ $collapsed := .Section.Params.bookCollapseSection }}
{{ if or $self $ancestor (not $collapsed) }} {{ if or $self $ancestor (not $collapsed) }}