Skip to contents

List example files for the package. Show the path when the exact name is given.

Usage

juicedown_example(name = NULL, file = NULL)

Arguments

name

character. A single string for example name.

file

character. A single string for the main file.

Value

character. A list of example files or a path string to each example file.

Details

The package sample files are organized under samples directory like so:

samples/ |-- from-html/ | -- sample.html -- include/ |-- pic/ `-- sample.Rmd

  • juicedown_example() is equivalent to ls samples,

  • juicedown_example("from-html") is to ls samples/from-html, and

  • juicedown_example("from-html", "sample.html") shows the full path.

Examples

juicedown_example()
#> [1] "from-html"  "include"    "javascript" "markdown"   "yaml-meta" 
juicedown_example("from-html")
#> [1] "sample.html"
juicedown_example("from-html", "sample.html")
#> [1] "/home/runner/work/_temp/Library/juicedown/samples/from-html/sample.html"