File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 33 {{ $bookSection = "/" }}{{/* Backward compatibility */}}
44{{ end }}
55
6- {{ $dirs := (split .CurrentSection.File.Dir "/") }}
6+ {{ $dirs := (split .CurrentSection.RelPermalink "/") }}
77{{ $dir := "" }}
8- {{ if and (gt (len $dirs) 1) (ne (index $dirs 0) "posts") }}
9- {{ $dir = (index $dirs 0) }}
10- {{ else if and (gt (len $dirs) 2) (eq (index $dirs 0) "posts" ) }}
8+ {{ if and (gt (len $dirs) 2) (ne (index $dirs 1) "posts") }}
119 {{ $dir = (index $dirs 1) }}
10+ {{ else if and (gt (len $dirs) 3) (eq (index $dirs 1) "posts" ) }}
11+ {{ $dir = (index $dirs 2) }}
1212{{ end }}
13- {{ with .Site.GetPage $bookSection $dir }}
14- {{ template "book-section-children" (dict "Section" . "CurrentPage" $) }}
15- {{ end }}
16-
1713{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}}
1814 < ul >
1915 {{ range (where .Section.Pages "Params.bookhidden" "ne" true) }}
You can’t perform that action at this time.
0 commit comments