diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 030fcaa..9dd5c84 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -17,14 +17,14 @@
{{- partialCached "search.html" . -}}
diff --git a/layouts/partials/sidebar/render-tree-branch.html b/layouts/partials/sidebar/render-tree-branch.html
new file mode 100644
index 0000000..457d294
--- /dev/null
+++ b/layouts/partials/sidebar/render-tree-branch.html
@@ -0,0 +1,19 @@
+{{- $context := .context -}}
+{{- $page := .page -}}
+{{- $entry := .entry -}}
+{{- $pageLink := .page.RelPermalink -}}
+
+
+
+ {{- range $entry }}
+ {{- $active := eq $pageLink .link -}}
+ {{- $shouldOpen := or (.open) (hasPrefix $pageLink .link) $active | default true }}
+ -
+ {{- template "sidebar-item-link" (dict "context" . "active" $active "title" .title "link" .link) -}}
+ {{- if .section -}}
+ {{- partial "sidebar/render-tree-branch" (dict "context" $context "entry" .section "page" $page) -}}
+ {{- end -}}
+
+ {{- end -}}
+
+
diff --git a/layouts/partials/sidebar/render-tree.html b/layouts/partials/sidebar/render-tree.html
new file mode 100644
index 0000000..ac4c075
--- /dev/null
+++ b/layouts/partials/sidebar/render-tree.html
@@ -0,0 +1,13 @@
+{{- $context := .context -}}
+{{- $page := .page -}}
+{{- $pageLink := .page.RelPermalink -}}
+{{- range .tree -}}
+ {{- $active := eq $pageLink .link -}}
+ {{- $shouldOpen := or (.open) (hasPrefix $pageLink .link) $active | default true }}
+
+ {{- template "sidebar-item-link" (dict "context" . "active" $active "title" .title "link" .link) -}}
+ {{- if .section -}}
+ {{- partial "sidebar/render-tree-branch" (dict "context" $context "entry" .section "page" $page) -}}
+ {{- end -}}
+
+{{ end }}