Coder Social home page Coder Social logo

bookdown_workshop's Introduction

Readme file for this bookdown

Instructions

To know if you have git or not

Go to terminal, type "git" (without quotation). If you don't have git, download and install it Go to your github profile, settings, navigate to SSH/GPG keys, give it title and enter RSA Key (generate this key from Rstudio, under tools>global options> Git/SVN> create RSA Key, view the public key and copy it to github account and paste there). Save the SSH keys

Now,

  1. Download this template
  2. Set your github settings and page.
  3. Clone the repo code
  4. Load your Rstudio, create a new project> Version control> paste the cloned url
  5. Edit the _bookdown, _output, and index and save them.
  6. Once you're done editing, then render the book,

How to create bookdown without using template

  1. Create a repository on github, clone it and repeat number 4 under instructions (opening Rstudio)
  2. Create README.md file in RStudio and edit. Add index.Rmd, create and edit _bookdown.yml and _output.yml in RStudio
  3. To add more chapters , create empty R Markdown and save it accordingly. N.B- Index is the 1st chapter.

Once you're done, render the book, commit and push to github and voila- you're done.

Render the book

  1. Install bookdown with install.packages("bookdown"). If you already have it, update to the latest version.

  2. Render locally with bookdown::render_book("index.Rmd").

  3. Use browseURL("docs/index.html") to view your book locally (or just open index.html in a browser).

  4. If it looks good, commit and push all changed files to GitHub.

(You will need to repeat steps 2 and 4 every time you wish to update the book online.)

If you're using the terminal command

git commit git push -u origin master git push -f origin master (force changes to the server with the local repo)

To get back to the github repo, use the code : usethis::browse_github().

PS: If you use my template here, I will appreciate if you acknowledge it when building your book. You could write a line or two, such as - This book was developed using the template available here version

Some helpful resources while building this book -

  1. https://github.com/jtr13/bookdown-template
  2. You may consult the official guide to bookdown: https://bookdown.org/yihui/bookdown

bookdown_workshop's People

Contributors

drhammed avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.