3

I've been having trouble building a bookdown book into Gitbook. I downloaded the bookdown-demo, opened the RStudio project, and used the Build Pane to build all formats.

This appears to generate the PDF and EPUB outputs with no issues, but the navigation bar in the Gitbook don't work and all I can see are the book's cover page. The links appear to be anchor links, but when clicked on, there are no changes to what is displayed. Also, there are no links at the bottom of the content for me to navigate forward and backwards. This is the same in both the RStudio viewer and in my browser when I open the /_book/bookdown-demo.html file in Chrome. Only 1 .html file is generated, rather than 1 per chapter, which is supposed to be default. I've tried changing the self_contained back and forth between true and false, but that doesn't seem to affect my results.

I've gone through the documentation multiple times and it sounds like it should be easy enough. Am I missing something? Please help.

EDIT: I am able to build the Gitbook with no issues on Windows, but cannot build it successfully on my Mac. On my Mac, I get the following warning message:

Output created: _book/bookdown-demo.html
Warning messages:  
1: In split_chapters(output, gitbook_page, number_sections, split_by,  :
You have 7 Rmd input file(s) but only 0 first-level heading(s). Did you forget 
first-level headings in certain Rmd files?
2: The label(s) intro, methods not found 

1 Answer 1

1

Silly me. I wasn't using the dev version of bookdown. I've now installed the dev version and it works fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.