Skip to content

Commit

Permalink
Merge branch 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
itcarroll committed Oct 4, 2018
2 parents 5467612 + abb58ba commit 64af9db
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 58 deletions.
16 changes: 4 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ Each lesson repository will include the above files in addition to the topical m
└── docs/
├── _posts/
├── _slides/
[├── _slides_pmd/]
[├── _slides_md/]
[├── _slides_Rmd/]
├── _slides_Rmd/ | _slides_pmd/ | _slides_md/
├── images/
└── _config.yml
```
Expand Down Expand Up @@ -109,19 +107,13 @@ Each file within one of these folders becomes a vertical stack of slides in a [R

Each lesson is a Jekyll site, automatically deployed by GitHub when pushed but also possible to serve up (with a little work) locally. The following instructions work with a `*-lesson` repo open as a project on https://rstudio.sesync.org.

From a terminal, execute:

```bash
make preview
```

This builds a static Jekyll site if any of the site content (e.g. the `docs/_slides` folder) has been updated since the last site build. To view the page in a browser, use the `servr` R package:
From RStudio, choose "Build All" from the "Build" tab. This builds a static Jekyll site if any of the site content (e.g. the `docs/_slides` folder) has been updated since the last site build. To view the built page in a browser, use the `servr` R package:

```r
servr::httd('docs/_site', port = 4000, initpath = 'instructor', daemon = TRUE)
servr::httd('docs/_site', initpath = 'instructor', daemon = TRUE)
```

Other valid `initpath` arguments are `course`, `slides`, or nothing. If port 4000 is not available, you'll have to dig into the Makefile and manually build the Jekyll site with a different "baseurl".
Other valid `initpath` arguments are `course`, `slides`, or nothing. If the default port (i.e. 4321) is not available, use the "Configure Build Tools..." menu item to add the argument `PORT=4322` and try building again.

## Versioning and Releases

Expand Down
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SHELL := /bin/bash
.DEFAULT_GOAL := slides
PORT ?= 4321
.DEFAULT_GOAL := preview

# look up lesson number and slides in Jekyll _config.yml
LESSON := $(shell ruby -e "require 'yaml';puts YAML.load_file('docs/_config.yml')['lesson']")
Expand All @@ -17,10 +18,10 @@ HANDOUTS := $(shell ruby -e "require 'yaml';puts YAML.load_file('docs/_config.ym
# do not run rules in parallel
## because bin/build_slides.R (.py) runs over all .Rmd (.pmd) slides
.NOTPARALLEL:
.PHONY: course origin slides archive preview
.PHONY: course upstream slides archive preview

# target to synchronize with GitHub
origin: | .git/refs/remotes/upstream
upstream: | .git/refs/remotes/upstream
git pull
git fetch upstream master:upstream
git merge --no-edit upstream
Expand Down Expand Up @@ -51,15 +52,15 @@ preview: slides | docs/_site
export GEM_HOME=$(HOME)/.gem
SITE = $(shell find ./docs/ ! -name _site)
docs/_site: $(SITE) | docs/Gemfile.lock
pushd docs && bundle exec jekyll build --baseurl=/p/4000 && popd
pushd docs && bundle exec jekyll build --baseurl=/p/$(PORT) && popd
touch docs/_site
docs/Gemfile.lock:
pushd docs && bundle install && popd

# target that brings this lesson into a course
## make target "course" is called within the handouts Makefile,
## assumed to be at ../../Makefile
course: origin slides $(addprefix ../../handouts/,$(HANDOUTS:worksheet%=worksheet-$(LESSON)%))
course: upstream slides $(addprefix ../../handouts/,$(HANDOUTS:worksheet%=worksheet-$(LESSON)%))
## copy lesson handouts to the ../../handouts/ directory
## while adding lesson numbers to worksheets
../../handouts/worksheet-$(LESSON)%: worksheet%
Expand All @@ -75,4 +76,7 @@ archive:

# target to create binary for GitHub release
release:
ln *.Rproj handouts.Rproj && zip -FSr handouts handouts.Rproj $(HANDOUTS) && rm handouts.Rproj
ln -s . handouts
if [ -f *.Rproj ]; then ln *.Rproj handouts.Rproj; fi
zip -FSr handouts handouts/handouts.Rproj $(addprefix handouts/,$(HANDOUTS))
rm -f handouts handouts.Rproj
78 changes: 38 additions & 40 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.9)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
Expand All @@ -13,42 +13,43 @@ GEM
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.9)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.0.5)
dnsruby (1.60.2)
dnsruby (1.61.2)
addressable (~> 2.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.11.0)
ffi (>= 1.3.0)
eventmachine (1.2.6)
eventmachine (1.2.7)
execjs (2.7.0)
faraday (0.15.0)
faraday (0.15.3)
multipart-post (>= 1.2, < 3)
ffi (1.9.23)
ffi (1.9.25)
forwardable-extended (2.6.0)
gemoji (3.0.0)
github-pages (183)
activesupport (= 4.2.9)
github-pages-health-check (= 1.7.3)
jekyll (= 3.7.3)
jekyll-avatar (= 0.5.0)
github-pages (192)
activesupport (= 4.2.10)
github-pages-health-check (= 1.8.1)
jekyll (= 3.7.4)
jekyll-avatar (= 0.6.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.1.5)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.9.3)
jekyll-feed (= 0.10.0)
jekyll-gist (= 1.5.0)
jekyll-github-metadata (= 2.9.4)
jekyll-mentions (= 1.3.0)
jekyll-mentions (= 1.4.1)
jekyll-optional-front-matter (= 0.3.0)
jekyll-paginate (= 1.1.0)
jekyll-readme-index (= 0.2.0)
jekyll-redirect-from (= 0.13.0)
jekyll-redirect-from (= 0.14.0)
jekyll-relative-links (= 0.5.3)
jekyll-remote-theme (= 0.2.3)
jekyll-remote-theme (= 0.3.1)
jekyll-sass-converter (= 1.5.2)
jekyll-seo-tag (= 2.4.0)
jekyll-seo-tag (= 2.5.0)
jekyll-sitemap (= 1.2.0)
jekyll-swiss (= 0.4.0)
jekyll-theme-architect (= 0.1.1)
Expand All @@ -65,28 +66,28 @@ GEM
jekyll-theme-tactile (= 0.1.1)
jekyll-theme-time-machine (= 0.1.1)
jekyll-titles-from-headings (= 0.5.1)
jemoji (= 0.9.0)
kramdown (= 1.16.2)
jemoji (= 0.10.1)
kramdown (= 1.17.0)
liquid (= 4.0.0)
listen (= 3.1.5)
mercenary (~> 0.3)
minima (= 2.4.1)
nokogiri (>= 1.8.1, < 2.0)
minima (= 2.5.0)
nokogiri (>= 1.8.2, < 2.0)
rouge (= 2.2.1)
terminal-table (~> 1.4)
github-pages-health-check (1.7.3)
github-pages-health-check (1.8.1)
addressable (~> 2.3)
dnsruby (~> 1.60)
octokit (~> 4.0)
public_suffix (~> 2.0)
typhoeus (~> 1.3)
html-pipeline (2.7.2)
html-pipeline (2.8.4)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.7.3)
jekyll (3.7.4)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
Expand All @@ -99,7 +100,7 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-avatar (0.5.0)
jekyll-avatar (0.6.0)
jekyll (~> 3.0)
jekyll-coffeescript (1.1.1)
coffee-script (~> 2.2)
Expand All @@ -113,33 +114,31 @@ GEM
rouge (~> 2)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.9.3)
jekyll-feed (0.10.0)
jekyll (~> 3.3)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-github-metadata (2.9.4)
jekyll (~> 3.1)
octokit (~> 4.0, != 4.4.0)
jekyll-mentions (1.3.0)
activesupport (~> 4.0)
jekyll-mentions (1.4.1)
html-pipeline (~> 2.3)
jekyll (~> 3.0)
jekyll-optional-front-matter (0.3.0)
jekyll (~> 3.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.2.0)
jekyll (~> 3.0)
jekyll-redirect-from (0.13.0)
jekyll-redirect-from (0.14.0)
jekyll (~> 3.3)
jekyll-relative-links (0.5.3)
jekyll (~> 3.3)
jekyll-remote-theme (0.2.3)
jekyll-remote-theme (0.3.1)
jekyll (~> 3.5)
rubyzip (>= 1.2.1, < 3.0)
typhoeus (>= 0.7, < 2.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.4.0)
jekyll-seo-tag (2.5.0)
jekyll (~> 3.3)
jekyll-sitemap (1.2.0)
jekyll (~> 3.3)
Expand Down Expand Up @@ -188,28 +187,27 @@ GEM
jekyll (~> 3.3)
jekyll-watch (2.0.0)
listen (~> 3.0)
jemoji (0.9.0)
activesupport (~> 4.0, >= 4.2.9)
jemoji (0.10.1)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (~> 3.0)
kramdown (1.16.2)
kramdown (1.17.0)
liquid (4.0.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
mini_portile2 (2.3.0)
minima (2.4.1)
minima (2.5.0)
jekyll (~> 3.5)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.11.3)
multipart-post (2.0.0)
nokogiri (1.8.2)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
octokit (4.8.0)
octokit (4.12.0)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.1)
forwardable-extended (~> 2.6)
Expand All @@ -221,9 +219,9 @@ GEM
ruby-enum (0.7.2)
i18n
ruby_dep (1.5.0)
rubyzip (1.2.1)
rubyzip (1.2.2)
safe_yaml (1.0.4)
sass (3.5.6)
sass (3.6.0)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand All @@ -238,7 +236,7 @@ GEM
ethon (>= 0.9.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.3.2)
unicode-display_width (1.4.0)

PLATFORMS
ruby
Expand Down

0 comments on commit 64af9db

Please sign in to comment.