diff --git a/layouts/partials/docs/menu-filetree.html b/layouts/partials/docs/menu-filetree.html index a4835b2..9ad1287 100644 --- a/layouts/partials/docs/menu-filetree.html +++ b/layouts/partials/docs/menu-filetree.html @@ -4,32 +4,32 @@ {{ end }} {{ with .Site.GetPage $bookSection }} - {{ template "book-section-children" (dict "Section" . "CurrentPage" $) }} + {{ template "book-section-children" (dict "Section" . "CurrentPage" $ "Level" 1) }} {{ end }} -{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}} +{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage "Level" .Level) */}} {{ end }} -{{ define "book-page-link" }}{{/* (dict "Page" .Page "CurrentPage" .CurrentPage) */}} +{{ define "book-page-link" }}{{/* (dict "Page" .Page "CurrentPage" .CurrentPage "Level" .Level) */}} {{ $current := eq .CurrentPage .Page }} {{ $ancestor := .Page.IsAncestor .CurrentPage }} - {{ if .Page.Params.bookCollapseSection }} - + {{ if (and .Page.IsSection (default .Page.Site.Params.BookCollapseSection .Page.Params.BookCollapseSection)) }} +