I am learning to use bookdown. So far I was able to compile my Rmd documents in sequence and the gitbook is compiled. However, i was not able to get a cover-page for my gitbook.
I did the exact code to put a png in images folder under the root directory for the book.
Could someone guide me how to get a book cover compiled.
It's really difficult to say what's going on without some code. Could you please include a snippet with how you've got the path to the image setup. Also, assuming you are hosting this on GitHub, the link might help as well.
Thank you for your reply. As it did not work for me on a local computer, I did not push it to git hub and now I am on a different machine. But I attach a screenshot of my root folder (last version). In the images folder, I had put a .png file. And then in yaml metadata of my index.Rmd, I said : cover-image: "images/cover.png" with the same indent level as title and author etc. Are there any size specifications for the image?
It sounds like the cover-image YAML option is for media previews of the site.
A nice effect of setting description and cover-image is that when you share the link of your book on some social network websites such as Twitter, the link can be automatically expanded to a card with the cover image and description of the book. https://bookdown.org/yihui/bookdown/html.html#gitbook-style
Thank you for the reply. I probably do not understand you clearly. I followed your suggestion and added the r code in the beginning of my document in index.Rmd like so...
It looks like the cover art is inserted manually in the bookdown example. knitr::include_graphics() is one way to insert images. You can also try to just insert the image manually with an image tag in markdown.