View source: R/build_instructor_notes.R
make_instructornotes_section | R Documentation |
This will append instructor notes from the inline sections of the lesson to
the instructor-notes page, separated by section and <hr>
elements.
make_instructornotes_section(name, contents, parent)
name |
the name of the section, (may or may not be prefixed with |
contents |
an |
parent |
the parent div of the images page |
the section that was added to the parent
On the learner view, instructor notes will not be present
build_instructor_notes()
, get_content()
if (FALSE) {
lsn <- "/path/to/lesson"
pkg <- pkgdown::as_pkgdown(fs::path(lsn, "site"))
# read in the All in One page and extract its content
notes <- get_content("instructor-notes",
content =
"section[@id='aggregate-instructor-notes']", pkg = pkg, instructor = TRUE
)
agg <- "/div[contains(@class, 'instructor-note')]//div[@class='accordion-body']"
note_content <- get_content("01-introduction", content = agg, pkg = pkg)
make_instructornotes_section("01-introduction",
contents = note_content,
parent = notes
)
# NOTE: if the object for "contents" ends with "_learn", no content will be
# appended
note_learn <- note_content
make_instructornotes_section("01-introduction",
contents = note_learn,
parent = notes
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.