diff --git a/.gitignore b/.gitignore index 45eed53..22ea661 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,14 @@ ## Ignore ... +*.Rmd +*/template/ +survey/ +*.csv +gps/eventListing.md +evals/ +lessons/potentials.md +_site/ + ## ...But not ignore these files + diff --git a/Makefile b/Makefile index f7b6329..fcf8a50 100644 --- a/Makefile +++ b/Makefile @@ -6,19 +6,18 @@ site_repo=`basename "$$PWD"` all : @grep -E '^##' Makefile | sed -e 's/##//g' ##------------------------------------------------------------------- -## test_local : Test the site locally before building live version +## test_local : Test the site locally before building live version test_local : jekyll serve --watch -## build_site : Build the GitHub pages site -build_site : +## update_site : Build the GitHub pages site +update_site : rsync -a --exclude='.git/' --exclude='.gitignore' ../workshops/ ../${site_repo}/ ./knitpost.R - jekyll build -## clean_dir : Clean up left over files from updated website +## clean_dir : Clean up left over files from updated website clean_dir : git clean -d -x -f -.PHONY : build_site test_local clean_dir +.PHONY : update_site test_local clean_dir diff --git a/_config.yml b/_config.yml index ea48187..324256d 100644 --- a/_config.yml +++ b/_config.yml @@ -25,6 +25,4 @@ lesson-list: [Git, Intro, Plotting, Wrangling, Rmarkdown, Macros, ODS] category-list: [R, Git, Macros, ODS, Lessons] tag-list: [Lessons, Git, GitHub, Macros, ODS, Assignment, Slides, Cheatsheet] -exclude: ['lessons/template/*', gps/eventListing.md, '*.Rmd', - evals/, survey/, lessons/potentials.md, README.md] diff --git a/knitpost.R b/knitpost.R index df1f3f4..29bb7af 100755 --- a/knitpost.R +++ b/knitpost.R @@ -12,7 +12,7 @@ KnitPost <- function(input, outfile, base.url = '/') { # this function is a modified version of an example here: # http://jfisher-usgs.github.com/r/2012/07/03/knitr-jekyll/ knitr::opts_knit$set(base.url = base.url) - knitr::opts_chunk$set(fig.path = 'images/', + knitr::opts_chunk$set(fig.path = '/lessons/images/', collapse = TRUE) knitr::render_jekyll() knitr::knit(input, outfile, envir = parent.frame())