View source: R/fix_sandpaper_links.R
fix_sandpaper_links | R Documentation |
This function will perform the transformation on three node types:
fix_sandpaper_links(body, yml = list(), path = NULL, known = NULL)
body |
an XML document |
yml |
the list of key/value pairs derived from the |
path |
the path to the current episode |
known |
a character vector of known episodes in the lesson, relative to the lesson root. |
image
link
html_node
The transformation will be to remove relative paths ("../") and replace Jekyll templating (e.g. " page.root " and " site.swc_pages " with either nothing or the link to software carpentry, respectively.
the body, invisibly
This is absolutely NOT comprehensive and some links will fail to be converted. If this happens, please report an issue: https://github.com/carpentries/pegboard/issues/new/
loop <- fs::path(lesson_fragment(), "_episodes", "14-looping-data-sets.md")
e <- Episode$new(loop)
pegboard:::make_link_table(e)$orig
e$use_sandpaper()
pegboard:::make_link_table(e)$orig
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.