It took me quite a lot time to try to solve this...
Note: this answer only works in non-English regions
Building a table of contents (TOC) in Hugo is challenging. Here I record my attempts to build my TOC correctly. It might be outdated.
Building blog sites manually is tedious and often leads to mistakes, especially when hosting on master/docs