nhs-r-community / statements-on-tools

The NHS-R Community statements on the use of open source tools including (but not exclusively) R and R Studio.
https://tools.nhsrcommunity.com/
Creative Commons Zero v1.0 Universal
14 stars 9 forks source link

Cannot locally build book because of child documents #24

Closed tomjemmett closed 2 years ago

tomjemmett commented 2 years ago

Currently it is not possible to locally build the book due to the use of child documents - while you can get bookdown to render the document, it will only ever pull in the files from the main branch making it impossible to ever verify your own changes. The only way to ever check that the changes you make work would be to commit to main, then check.

I suggest that we remove the use of child documents and move to a single repo (#19, #23 seem to be handling this), then move to use bookdown in a more traditional sense with individual files. I'm happy to sort this.

Options then would be to either name each file as "00-filename.rmd", setting the numbers to order the chapters as we wish, set the order in _bookdown.yml (e.g., like rd4s did in the first edition), or move to quarto (e.g. as r4ds has moved to. My shout would be on the first option, I think this typically makes it clear how the book will be built just looking in the files pane.

Once we have done this we can sort of resolve #18 - though this will not be run once per day but run on merge's into main (usethis::use_github_action("bookdown") will probably be sufficient, and the action will need no tweaking)