Skip to content

Commit

Permalink
update dir
Browse files Browse the repository at this point in the history
  • Loading branch information
xnzone committed Oct 30, 2022
1 parent a24088f commit 3a1df91
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions layouts/partials/book-menu-filetree.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
{{ $bookSection = "/" }}{{/* Backward compatibility */}}
{{ end }}

{{ $dirs := (split .CurrentSection.RelPermalink "/") }}
{{ $dir := "" }}
{{ if and (gt (len $dirs) 2) (ne (index $dirs 1) "posts") }}
{{ $dir = (index $dirs 1) }}
{{ else if and (gt (len $dirs) 3) (eq (index $dirs 1) "posts" ) }}
{{ $dir = (index $dirs 2) }}
{{ end }}
{{ $dir := .Section }}
{{ with .Site.GetPage $bookSection $dir }}
{{ template "book-section-children" (dict "Section" . "CurrentPage" $) }}
{{ end }}
Expand Down

0 comments on commit 3a1df91

Please sign in to comment.