Skip to content

Commit dbf6b33

Browse files
committed
Expand current sidebar node
When a user selects a sidebar menu entry, expand all the direct children of that entry. Signed-off-by: Aidan Delaney <[email protected]>
1 parent 8aed414 commit dbf6b33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

themes/buildpacks/layouts/partials/sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
{{- if ne $numberOfPages 0 }}
5353
{{- $depth = add (int $depth) 1 }}
5454
<ul class="ml-2">
55-
{{- $expand = .Params.expand -}}
55+
{{- $expand = (or .Params.expand $isCurrent) -}}
5656
{{- $pages := (.Pages | union .Sections) }}
5757
{{- range $pages.ByWeight }}
5858
{{- if (not .Params.hidden) }}

0 commit comments

Comments
 (0)