View source: R/utils-aggregate.R
read_all_html | R Documentation |
read all HTML files in a folder
read_all_html(path)
path |
the path to a folder with HTML files |
a nested list of html_documents
from xml2::read_html()
with two
top-level elements:
$learner
: contains all of the html pages in the learner view
$instructor
: all of the pages in the instructor view
$paths
: the absolute paths for the pages
tmpdir <- tempfile()
on.exit(fs::dir_delete(tmpdir))
fs::dir_create(tmpdir)
fs::dir_create(fs::path(tmpdir, "instructor"))
writeLines("<p>Instructor</p>", fs::path(tmpdir, "instructor", "index.html"))
writeLines("<p>Learner</p>", fs::path(tmpdir, "index.html"))
sandpaper:::read_all_html(tmpdir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.