-
Notifications
You must be signed in to change notification settings - Fork 52
Publishing
After we make changes or additions to the book’s qmd files, we need to render and publish the book again. This page contains instructions for doing so.
We can render the files by clicking the Render button in RStudio, and
this works well for previewing individual chapters. To render the
entire book – especially in multiple formats (e.g., HTML and PDF) at the
same time – type quarto render
into the terminal.
```{bash}
quarto render
```
This article
gives great instructions for publishing to GitHub. Briefly, type
quarto publish gh-pages
in the terminal after committing and pushing
to the GitHub repo.
```{bash}
quarto publish gh-pages
```
A few gotchas:
-
Make sure you are on the main branch when committing and pushing.
-
Remember that Quarto will locally render the file the way we saved it whether we committed and pushed the file to the GitHub repo or not. However, the gh-pages branch will not reflect the saved changes unless they’ve been committed and pushed to the GitHub repo. If the published version of the book looks or behaves differently than the local files on our computer, this is a likely cause.
We’d like to implement some kind of automatic checks for broken links in the book. There is an open issue requesting an automatic URL checker on Quarto’s GitHub. That GitHub thread also recommends the dead link checker website for doing manual checks. It works, but we would also like to eventually find a more automated solution. We have an issue on the R4Epi project board about this.
For now, just remember to periodically check for broken links using the dead link checker website.