From 561659ed53a1eb1e7583513af5fa2faba55fca7e Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Mon, 17 Sep 2018 18:29:36 +0200 Subject: Improve page title handling and side menu templates --- layouts/partials/docs/nav-filetree.html | 55 +++++++++++++++------------------ 1 file changed, 25 insertions(+), 30 deletions(-) (limited to 'layouts/partials/docs/nav-filetree.html') diff --git a/layouts/partials/docs/nav-filetree.html b/layouts/partials/docs/nav-filetree.html index c5ecfc8..7c80ae2 100644 --- a/layouts/partials/docs/nav-filetree.html +++ b/layouts/partials/docs/nav-filetree.html @@ -1,15 +1,5 @@ -{{ $bookSection := default "docs" .Site.Params.BookSection }} -{{ if eq $bookSection "*" }} - {{ .Scratch.Set "BookSections" .Site.Sections }} -{{ else }} - {{ $bookSections := where .Site.Sections "Section" $bookSection }} - {{ .Scratch.Set "BookSections" $bookSections }} - - {{ if eq (len $bookSections) 1 }} - {{ $singleSection := index $bookSections 0 }} - {{ .Scratch.Set "BookSections" $singleSection.Sections }} - {{ end }} -{{ end }} + +{{ template "book-get-root-section" . }}