When an episode needs to be added to the AiO, this will insert the XML nodes from the episode contents in its own section inside the All In One page.
Arguments
- name
the name of the section, prefixed with
episode-
- contents
the episode contents from
get_content()
- parent
the parent div of the AiO page.
Examples
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
aio <- get_content("aio", content = "self::*", pkg = pkg)
episode_content <- get_content("01-introduction", pkg = pkg)
make_aio_section("aio-01-introduction",
contents = episode_content, parent = aio
)
}