pkgdown
pkgdown copied to clipboard
Standard helper for extracting options from _pkgdown.yaml
Should include default value, and provide list of keys, where everything apart from the first key is treated as a deprecated, and generates an deprecation message.
Could also do some type checking?
Look for uses of check_yaml_has and pkgdown_config_href
Actually pkgdown_field() looks more reliable.
config_markdown_inline(pkg, path)
config_markdown_block(pkg, path)
config_string(pkg, path)
config_list(pkg, path)
config_character(pkg, path)
config_exclusive(pkg, path1, path2) #?
check_yaml_has() goes away; it's replaced by config_string() in data_home_component(), and the remaining use can be inlined.
Maybe config_pluck_string()?
- Need to create new
utils-config.R(or maybe justconfig.R?) - All
config()functions should have call arg - Look at other uses of
pluck()and$ config_pluck_bool()?- How to handle defaults/deprecation fallbacks. Maybe that's easy because there no required values? That's not completely true, but all the required values are nested in other top-level values?
- Instead of
config_pluck_list()maybeconfig_pluck_struct()andconfig_pluck_array_of_structs()? (With better names)