{{ $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) */}} {{ end }} {{ define "book-page-link" }}{{/* (dict "Page" .Page "CurrentPage" .CurrentPage) */}} {{ $current := eq .CurrentPage .Page }} {{ $ancestor := .Page.IsAncestor .CurrentPage }} {{ $title := partial "docs/title" .Page }} {{ if .Page.Params.icon }} {{ $title = printf "%s  %s" .Page.Params.icon $title }} {{ end }} {{ if .Page.Params.bold }} {{ $title = printf `
%s
` $title }} {{ end }} {{ if .Page.Params.sectionBreak }}
{{ end }} {{ if .Page.Params.bookCollapseSection }} {{ else if .Page.Content }} {{- $title | safeHTML -}} {{ else }} {{- $title | safeHTML -}} {{ end }} {{ end }}