Index.Rmd without first-level heading
Asked Answered
R

0

7

I have a simple bookdown project with several Rmd files, one file per chapter plus an index.Rmd.

index.Rmd

---
title: Title
author: My name
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
---

01-chapter1.Rmd

# Some stuff

etc...

I want my index file mostly empty because all the chapter files are interchangeable, for now at least. I don't plan to have any short introduction. I might want to add some preface, but that breaks everything. Bookdown wants me to start with a chapter in the index.Rmd

Result

I can generate pdf and epub without any problem but for html or gitbook I get an error:

In split_chapters(output, gitbook_page, number_sections, split_by, : You have 6 Rmd input file(s) but only 5 first-level heading(s). Did you forget first-level headings in certain Rmd files?

and the generated book only consist of an error message:

/home/milo/Documents/bookdown_project/_book/index.html not found

Ritter answered 18/10, 2019 at 13:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.