mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-04-04 21:05:42 +00:00
#212, Fix use of IsAncestor after hugo breaking change
This commit is contained in:
parent
5be250b0e2
commit
2b430b0b41
@ -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) }}
|
||||
|
Loading…
Reference in New Issue
Block a user