get_fm | R Documentation |
Imports meta/front-matter.yml value(s) to environment as a list.
get_fm(
key = NULL,
WD = "?",
WD_git = NULL,
yaml_path = NULL,
checkWD = FALSE,
auto_init = FALSE,
check = NULL,
always_list = FALSE,
standardize_NA = TRUE,
...
)
key |
which entry (or entries) do you want to import? default=NULL will import everything; Supports "starts with", case-insensitive matching for a single key if prefixed with '~' |
WD |
working directory; default=getwd(); if "?" supplied, will invoke |
WD_git |
default=NULL. If you already know the path to the gp-lessons folder, this is more efficient. |
yaml_path |
default=NULL. An alternate way to just provide a full path to read in a yml file. |
checkWD |
passed to |
auto_init |
logical; do you want to automatically create a front-matter.yml file if it's not found? Runs |
check |
string referring to a check function(x) to pass to |
always_list |
logical; do you want to always return a list? default=FALSE will unlist() the result if it seems to be a single item |
standardize_NA |
logical; do you want all "",NULL,list(), etc. to be read in as NA using |
... |
additional args passed to check function |
If you ask for only one key, output will be a vector, rather than a list
Tries to cromulently return an appropriate string, tibble, list or vector of values for the associated keys.
get_fm()
get_fm(key=c("Title","ShortTitle","locale"))
get_fm(key="Title",WD=pick_lesson())
#partial matching for all front-matter entries starting with 'gdrive' (case insensitive)
get_fm("gdrive","?")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.