Table of content not visible initially

I have written an ebook with bookdown in a gitbook format. I retrieved the html pages so I can upload it to my personal website.

It works like a charm with one exception. The first time the reader views the ebook, the table of content is not visible on the left side. He must click on the small picto 'toggle sidebar' to make it visible.

Is there a way to make the TOC in the sidebar always visible? If not, how can I make sure it is visible when the user arrives on the ebook at first?

Thanks in advance,


With gitbook(), the TOC for navigation should be opened by default. Unless the user did hid it at last visit, and this preference will be cached in browser, meaning next visit it will be hidden

See my answer there for a JS trick

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.