NEONScience / neon-data-institute-2016

This repository hosts the educational materials for the NEON Data Institute on Remote Sensing with Reproducible Workflows (2016).
http://NEONScience.github.io/neon-data-institute-2016
1 stars 5 forks source link

code to render html files in a new md file #61

Open lwasser opened 8 years ago

lwasser commented 8 years ago

this is what we need to do:


title: "Print HTML"

output: html_document

Look! We made magic happen

Here are your files!

```{r setup, echo=FALSE}

# get a list of all html files in a dir
all.files <- list.files(pattern="\\.html$")

# for each element in the list, turn into a markdown link.
for (a.file in (1:length(all.files))){ 
  cat(paste0("* [Stuff](", all.files[a.file], ") \n"))
  }

then knit

``` r
require(knitr)
opts_chunk$set(fig.path = fig.path)
opts_chunk$set(fig.cap = " ")
# render_jekyll()
render_markdown(strict = TRUE)
# create the markdown file name - add a date at the beginning to Jekyll recognizes
# it as a post
mdFile <- paste0("2016-05-05-test.md")

input <- "export-html.Rmd"

# knit Rmd to jekyll flavored md format 
knit(input, output = mdFile, envir = parent.frame())
mjones01 commented 8 years ago

Is this an .RMD I should make for the Participants repo within the participants directory?

lwasser commented 8 years ago

It's the start of one. I have to add code to move the files from the participants repo to the main DI repo. I actually though have a more important task that i'm going to ask you to work on given it sounds like your plate for today is full. I'll add that to ASANA today. It's fixing / cleaning some of the TOS data that Cody sent to me.