How do i get the TOC of each page in the sidebar?

Hi there. I have a doc site like this:

/content/Chapter I/Chapter I.md
/content/Chapter II/Chapter II.md

Each chapter have subtitles and stuff that Hugo generates the TOC and works seamlessly. On each page i have a button (docdock template) with the TOC, awesome. But on the sidebar I just get:

Chapter I
Chapter II

I want somethig like

Chapter I
L Title 1
L Title 2
L Title 2
L …

Chapter II
L Title 1
L Title 2
L Title 2
L …

Just like the goHugo website and many others:

How can i achieve this? Thanks!

See https://gohugo.io/extras/toc/

Edit. I misunderstood on first glance. You are wanting to incorporate separate md files in the TOC. This is for content in just one md file…

What you probably want is to use actual menus. See https://gohugo.io/extras/menus/https://gohugo.io/extras/menus/

The last example in the menu page linked above may help, and is what I used to create a multi-level menu myself.