library(yaml) conf <- yaml.load_file("_schedule.yml") course_ <- conf[["course"]] course_title <- course_[["title"]] start_data <- course_[["start"]] end_data <- course_[["end"]] exam <- course_[["exam"]] slots <- course_[["slots"]]
r course_title
( r start_data
-- r end_data
)for (i in 1:length(slots) ) { slot <- slots[[i]] doc <- paste0(names(slots[i]),".html") # <slot name>.html cat('#### (',i,') [', slot[["title"]] ,':',slot[["subtitle"]],'](',doc,')\n\n') cat('##### ', slot[["date"]],' | ',slot[["time"]],' | ',slot[["venue"]]) if (slot[["tasks"]] == "yes") { cat(' | [ [exercises](',sub(".html", ".tasks.nocode.html", doc) ,') ]' ,' ', '[ [solutions](',sub(".html", ".tasks.html", doc),') ]' , '\n\n---') } cat('\n\n\n\n') } cat('### Exam: ', exam[["date"]],' | ',exam[["time"]],' | ',exam[["venue"]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.