GithubHelp home page GithubHelp logo

itcr_example's Introduction

ITCR_Course_Template

This template includes all of the files that you need to get started creating your course in R Markdown using the bookdown package. This is useful as this package allows you to preview your course easily from RStudio and to eventually host a book on GitHub and Leanpub.

Creating your course

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-chapter_of_course.Rmd. We would update our _bookdown.yml to look like this:

book_filename: "ITCR_Course_Name"
chapter_name: "Chapter "
repo: https://github.com/jhudsl/ITCR_Course_Template/ ##Make sure you update this for your GitHub Repo!!
rmd_files: ["index.Rmd",
"01-intro.Rmd",
"02-chapter_of_course.Rmd",
"03-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.

You will then see a live version of your book in your RStudio viewer.

Getting your course ready for Leanpub

We also include the necessary files to allow you to get your course ready for publication on Leanpub. These are located in the manuscript directory. When you are happy with your book using bookdown, then you just need to follow a few steps to copy the necessary files from your docs directory into the manuscript directory. The docs directory is auto-generated by the bookdown package. You need to copy time images directory as well as the .md files.

If you are comfortable using commands like the following, you can do this in a more automated way in the RStudio terminal:

cp docs/*.md manuscript
cp -r docs/images/ manuscript/resources/images

Finally you need to modify the Book.txt file in the manuscript directory to include the .md files that you wish in the order that you would like. We have also included a quiz example. If you wanted two quizzes (one called quiz_1.md and one called quiz_2.md) you could duplicate and modify quiz_1.md for your needs and then you could make the Book.txt file look like this (assuming you created a chapter called "03-chapter_of_course.Rmd" and you wanted quiz_1 to be after 02-chapter-of_course and quiz_2 to be after 03_chapter_of_course:

01-intro.md
02-chapter_of_course.md
quiz_1.md
03-chapter_of_course.md
quiz_2.md
about.md

Note that any .md files with an # in front of the name in the Book.txt file will be ignored by Leanpub. We have included an example of this in the Book.txt file.

Hosting your course on Leanpub

To then host your course on Leanpub follow these steps:

  1. Make a Leanpub account here: https://leanpub.com/

  2. Start a course

  • click on the 3 line menu button
  • click the author tab on the far left
  • click Courses
  • click the text that says create a new course
  • fill out all the necessary information
  • select using Git and GitHub (if you work with us at JHU there is a different protocol)
  • press the add to plan button
  1. Preview a new version
  • click on the 3 line menu button
  • click the author tab on the far left
  • click Courses
  • click on your course name/icon
  • click "Preview New Version"
  • click Create Preview button
  1. Once you are ready and you like your course, you can click the "Publish New Version" instead of "Preview New Version"

itcr_example's People

Contributors

carriewright11 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.