setup_resources: Setup paths to resources used in learnr tutorials

Description Usage Arguments See Also

View source: R/utils.R

Description

This helper function provides the paths for any resources used in learnr tutorials. During package development, each <tutorial> is located in inst/tutorials/<tutorial>/ and resources in inst/resources/ (relative to the root of the package). After installation, <tutorial> is in tutorials/<tutorial>/ and resources in resources/ (relative to the root of the installed package). shiny::addResourcePath creates a prefix to be used as filepath to the following resources: images (/images), css files /css, and example script files scripts. The default parameters assume the installed package folder structure described above.

Usage

1
2
3
4
5
setup_resources(
  css = "resources/css",
  images = "resources/images",
  scripts = "resources/scripts"
)

Arguments

css

A string giving the css location relative to installed package.

images

A string giving the images location relative to installed package.

scripts

A string giving the scripts location relative to installed package.

See Also

addResourcePath()


EDUCE-UBC/educer documentation built on Sept. 1, 2021, 3:46 p.m.