How do you create a nested book within bookdown?

Within the navigation, bookdown only allows for 3 levels of headings. I am trying to create a book with at least 8 levels. It is very important for even the 8th level to be easily navigated to. I was thinking about solving this solution with a nested book. For example, you have your first book. Then within a page in your first book, you have a link that you click on, that takes you to your second book.

The issue is, since I am creating two books, I would have two index.Rmd files - which doesn't work, since both would be located in same location on github. It would also mean my website would have the same webaddress for two pages. Another issue is, I don't think that when searching in the first book, pages in the second book will show up.

What are some ways to solve the problem of needing more than 3 levels in navigation? Currently I was thinking about nested books but am having trouble figuring out how to do it.

Upvotes: 2

Views: 110

Answers (1)

jtbayly
jtbayly

Reputation: 303

More than three levels of headings are possible. Simply put the following in your YAML.

gitbook:
    toc_depth: 6

However, that doesn't get you to 8, since there are only 6 levels of headers in HTML, I believe.

You could use PART to get to 7. Not sure how you'd get to 8, except by splitting into multiple books.

Upvotes: 1

Related Questions