bookdown
bookdown copied to clipboard
`bookdown::clean_book()` should ignore `.nojekyll` file used when deployed on github pages.
Scenario:
- Use
docs/asoutput_dir - Build the book
- Manually adds
.nojekyllinside the folder (related to https://github.com/rstudio/bookdown/issues/1092 for better config) - Push to Github
- Publish
docs/as github pages
Cleaning the project should not remove the manually created jekyll file. This could be an option in clean_book(clean = TRUE, keep_nojekyll = TRUE)
Using
resource_files:
- .nojekyll
and file.create(".nojekyll") does not help.
For now, workaround is to set
file.create(bookdown:::output_path(".nojekyll"))
in a setup chunk.
So we could also offer a setup function to run for this
bookdown::use_github_pages()
that would do this
Or just export output_path and document.