Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add start to Coursera stuffs #171

Merged
merged 17 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/render-bookdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ jobs:
jhudsl/course_template \
Rscript -e "bookdown::render_book('index.Rmd')"

##### If you do not wish to host your course on Coursera, you can delete this section #####
# Run Coursera version
- name: Run Coursera version of render
run: |
docker run \
--mount type=bind,target=/home/rstudio,source=$PWD \
jhudsl/course_template \
Rscript --vanilla "scripts/render_all_coursera.R"
##### End of Coursera rendering section ########################################

# Commit the rendered bookdown files
- name: Commit rendered bookdown files
run: |
Expand Down
1 change: 0 additions & 1 deletion 01-intro.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: "Course Title"
output: html_document
---


Expand Down
27 changes: 13 additions & 14 deletions 02-chapter_of_course.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: "Chapter of course"
output: html_document
---


Expand Down Expand Up @@ -43,7 +42,7 @@ Here's a subheading and some text in this subsection!

### Code examples

You can demonstrate code like this:
You can demonstrate code like this:

```{r}
output_dir <- "code_output"
Expand All @@ -52,7 +51,7 @@ if (!dir.exists(output_dir)) {
}
```

And make pretty plots too:
And make pretty plots too:

```{r}
iris %>%
Expand All @@ -61,7 +60,7 @@ iris %>%
theme_bw()
```

You can also save these plots to file:
You can also save these plots to file:

```{r}
ggsave(file.path(output_dir, "test_ggplot2.png"))
Expand All @@ -70,48 +69,48 @@ ggsave(file.path(output_dir, "test_ggplot2.png"))
### Image example


How to include a Google slide. It's simplest to use the `leanbuild` package:
How to include a Google slide. It's simplest to use the `leanbuild` package:

```{r, fig.align='center', echo = FALSE, fig.alt= "Major point!! example image"}
leanbuild::include_slide("https://docs.google.com/presentation/d/1YmwKdIy9BeQ3EShgZhvtb3MgR8P6iDX4DfFD65W_gdQ/edit#slide=id.gcc4fbee202_0_141")
```

But if you have the slide or some other image locally downloaded you can also use html like this:
But if you have the slide or some other image locally downloaded you can also use html like this:

<img src="resources/images/02-chapter_of_course_files/figure-html//1YmwKdIy9BeQ3EShgZhvtb3MgR8P6iDX4DfFD65W_gdQ_gcc4fbee202_0_141.png" title="Major point!! example image" alt="Major point!! example image" style="display: block; margin: auto;" />


### Video examples

You can use `knitr::include_url()` like this:
You can use `knitr::include_url()` like this:

```{r}
knitr::include_url("https://www.youtube.com/embed/VOCYL-FNbr0")
```

OR this works:
OR this works:

<iframe src="https://www.youtube.com/embed/VOCYL-FNbr0" width="672" height="400px"></iframe>

### Links to files

This works:
This works:

```{r, fig.align="center", echo=FALSE}
knitr::include_url("https://www.messiah.edu/download/downloads/id/921/Microaggressions_in_the_Classroom.pdf", height = "800px")
```

Or this:
Or this:

[This works](https://www.messiah.edu/download/downloads/id/921/Microaggressions_in_the_Classroom.pdf).

Or this:
Or this:

<iframe src="https://www.messiah.edu/download/downloads/id/921/Microaggressions_in_the_Classroom.pdf" width="672" height="800px"></iframe>

### Links to websites

Examples of including a website link.
Examples of including a website link.

This works:

Expand All @@ -121,9 +120,9 @@ knitr::include_url("https://yihui.org")

OR this:

![Another link](https://yihui.org)
![Another link](https://yihui.org)

OR this:
OR this:

<iframe src="https://yihui.org" width="672" height="400px"></iframe>

Expand Down
4 changes: 1 addition & 3 deletions About.Rmd
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: "about"
output: html_document
title: "About"
---

# About the Authors {-}


**Author Name** is a Blank in the Blank at the Blank.

1 change: 1 addition & 0 deletions _bookdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ rmd_files: ["index.Rmd",
"02-chapter_of_course.Rmd",
"About.Rmd"]
new_session: yes
bibliography: [book.bib, packages.bib]
delete_merged_file: true
language:
ui:
Expand Down
Loading