
And I remember now !! You need to use the same parameter as in rmarkdown::html_document, called toc_depth because Pandoc which is generating the toc will default to three levels !!
That means you should add
gitbook:
toc_depth: 6
in the yaml header !
It is documented in the help page as ... is passed to html_document as explained, and html_document has this option !
Sorry for having forgot this !