{{ $bookSection := default "docs" .Site.Params.BookSection }} {{ if eq $bookSection "*" }} {{ $bookSection = "/" }}{{/* Backward compatibility */}} {{ end }} {{ with .Site.GetPage $bookSection }} {{ template "book-section-children" (dict "Section" . "CurrentPage" $) }} {{ end }} {{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}}