This is a minimal example of a book based on R Markdown and bookdown (https://github.com/rstudio/bookdown).
- Create a book using
bs4_book
style of a book as a new project in RStudio. - Rename the
_book
folder created as a default todocs
folder - Edit
_bookdown.yml
to add- output_dir: docs
- @GitHub: Create a repo in GitHub with the same name as the project.
- Using Terminal:
- 5.1. git init
- 5.2. git add README.md
- 5.3. git commit -m "first commit"
- 5.4. git branch -M main
- 5.5. git remote add origin git@github.com:icu-hsuzuki/ds_education.git
- 5.6. git push -u origin main
- Restart R Studio
- Build Book
- Git: Commit "first build" > Push
- @GitHub: Pages > main > docs
- Login to GitHub account
- Copy SSH address under Code>Clone
- Create a new project using Version Control:Git with the SSH address by setting the directory name
- Edit README.md and test Git Commit and Push
The bookdown book: https://bookdown.org/yihui/bookdown/
The bookdown package reference site: https://pkgs.rstudio.com/bookdown