When index.qmd contains an r code chunk, rendering to epub creates an invalid epub file, that also can't opened as a zip file.

Example to reproduce this problem:

Create a Quarto Book from RStudio. When you specify Knitr as engine then the generated files index.qmd, intro.qmd and summary.qmd contain a simple r chunk. When you specify None as engine then you should add manuallly an R chunk to index.qmd.
Then add "epub: default" to "format:" in _quarto.yml (or replace the existing formats). After rendering the book to this or all formats, an epub file is created. But you can't open the file with an epub reader (Calibre) or with an zip app.

Remove the r chunk from index.qmd and render the book again to get a valid epub.

Used Quarto version: 1.0.37 (Windows 10)
jjallaire
2022-08-05T09:36:40Z
bwelman
v1.1
closed
Invalid epub created when index.qmd contains r code chunk
https://github.com/quarto-dev/quarto-cli/issues/1695