bookdown icon indicating copy to clipboard operation
bookdown copied to clipboard

Add a workflow to test some external book example

Open cderv opened this issue 2 years ago • 3 comments

We could maybe add a workflow to run from time to time to build known project out there and checks that everything is still at least building ok.

Hard part is testing that the content is not changed has this would imply manual inspection. For this, maybe it is best to rely on each developer to tests against dev bookdown regularly. we could laybe write about that if we want to promote.

Several examples:

  • [ ] From @ThierryO : set of working examples with bookdown combined with another style . collection of documents used to test their corporate identity (https://github.com/inbo/inbomd). Related to https://github.com/rstudio/bookdown/issues/1408

cderv avatar Feb 28 '23 09:02 cderv

Here is an idea of a potential workflow which assumes that changing to the dev version should not alter the output. Not sure if it works for all output formats.

  1. build the examples using the production version of bookdown
  2. place the output under version control
  3. rebuild the examples using the dev version of bookdown while keeping everything else the same.
  4. use the version control to see what changed

ThierryO avatar Feb 28 '23 09:02 ThierryO

This is a good idea. We do such type of comparing in knitr-examples repo but for single document.

This would require that nothing is using timestamp or non seed set randomization. I am thinking about what will be in HTML <head> for example, or any random id like for htmlwidgets. But this definitely worth a try for HTML output.

For PDF, it is a bit harder.

cderv avatar Feb 28 '23 11:02 cderv