Skip to content

Commit 3a1df91

Browse files
committed
update dir
1 parent a24088f commit 3a1df91

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

layouts/partials/book-menu-filetree.html

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@
33
{{ $bookSection = "/" }}{{/* Backward compatibility */}}
44
{{ end }}
55

6-
{{ $dirs := (split .CurrentSection.RelPermalink "/") }}
7-
{{ $dir := "" }}
8-
{{ if and (gt (len $dirs) 2) (ne (index $dirs 1) "posts") }}
9-
{{ $dir = (index $dirs 1) }}
10-
{{ else if and (gt (len $dirs) 3) (eq (index $dirs 1) "posts" ) }}
11-
{{ $dir = (index $dirs 2) }}
12-
{{ end }}
6+
{{ $dir := .Section }}
137
{{ with .Site.GetPage $bookSection $dir }}
148
{{ template "book-section-children" (dict "Section" . "CurrentPage" $) }}
159
{{ end }}

0 commit comments

Comments
 (0)