I have a docs site with a sidebar. Right now, I can press one “topic” on the left and everything inside that topic is a “child” to the topic.
I want to make so that the child has another child, if that makes sense (I dont know the terminology).
I am using the Compose template and have tried playing around with it. Most of the time I have been able to do what I want, but this is a bit too hard for me. I have tried to add another header element in the sidebar code, but I only get errors. I think the sidebar.html file in partials is where I have to modify it.
Sidebar.html is:
<aside class="aside">
{{- template "tree" (dict "page" . "section" .FirstSection) }}
{{- define "tree" }}
{{- $section := .section }}
{{- $page := .page }}
{{- $permalink := $page.RelPermalink }}
<section class="section">
<h2 class="section_title{{ if eq $section.RelPermalink $permalink }} active{{ end }}"><a href="{{ $section.Permalink }}" class="group">{{ $section.Title }}</a></h2>
{{- $pages := $section.Pages }}
{{- with $pages }}
<section class="" id="docs-{{ anchorize $section.Title }}">
{{- range . }}
{{- if .IsPage }}
<h3 class="section_link{{ if eq .RelPermalink $permalink }} active{{ end }}"><a id="docs-{{ anchorize .Title }}" href="{{ .Permalink }}">{{ .Title }}</a></h3>
{{- if ne (print .TableOfContents) ""}}
{{- .TableOfContents }}
{{- end }}
{{- else }}
{{- template "tree" (dict "page" $page "section" .) }}
{{- end }}
{{- end }}
</section>
{{- end }}
</section>
{{- end }}
</aside>