-
Notifications
You must be signed in to change notification settings - Fork 14
Publishing with Bookdown
Bookdown is published using Github pages which you can set up following the set up repository instructions.
As you modify the names of the chapters of your course and add more chapters (using the .Rmd
files), you need to update the _bookdown.yml
file accordingly.
For example let's say that we added another chapter and named the file 03-new_chapter_of_course.Rmd
.
We would update our _bookdown.yml
to look like this:
book_filename: "Course_Name"
chapter_name: "Chapter "
repo: https://github.com/jhudsl/OTTR_Template/ ##Make sure you update this for your GitHub Repo!!
rmd_files: ["index.Rmd",
"01-intro.Rmd",
"02-chapter_of_course.Rmd",
"03-new_chapter_of_course.Rmd", ##Only this is new!
"about.Rmd"]
new_session: yes
delete_merged_file: true
language:
ui:
chapter_name: "Chapter "
output_dir: "docs"
Notice how only one line is different - the one that says 03-chapter_of_course.Rmd",
Be careful about quotation marks: ""
as well as commas: ,
!
Once we do this we can preview the book!
You can do so by typing:
bookdown::serve_book()
in the RStudio Console.
Note that when you run bookdown
it will create an .rds
file; you can generally ignore this file.
You will then see a live version of your book in your RStudio viewer.
Note that When a pull request is merged to main, bookdown::render_book()
will be re-run by the GitHub actions and the results added to main
.
If you encounter any problems or have ideas for improvements to this template repository or this getting started guide, please file an issue here! Your feedback is very much appreciated.
Note all materials in this template are licensed CC-BY and can be repurposed freely with attribution.
- Getting started
- Start a new course!
- Start editing course files
- Content creation tips
- Setting up images and videos
- About citations
- About Docker
- Spell check
- URL check
- Generate docx output
- Borrowing chapters between courses
- Most common errors
- Choosing between platforms
- Publishing with Bookdown
- Publishing on Coursera
- Publishing on Leanpub
- Making quizzes private (Leanpub and Coursera)
- Set up user feedback method
- Change title and style
- Credits section
- Adding Google Analytics Traffic Tracking
- Release a course for public viewing