Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard helper for extracting options from _pkgdown.yaml #1927

Closed
hadley opened this issue Nov 30, 2021 · 4 comments · Fixed by #2556
Closed

Standard helper for extracting options from _pkgdown.yaml #1927

hadley opened this issue Nov 30, 2021 · 4 comments · Fixed by #2556
Labels
upkeep maintenance, infrastructure, and similar

Comments

@hadley
Copy link
Member

hadley commented Nov 30, 2021

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.

@hadley hadley added the upkeep maintenance, infrastructure, and similar label Nov 30, 2021
@hadley
Copy link
Member Author

hadley commented May 31, 2022

Could also do some type checking?

@hadley
Copy link
Member Author

hadley commented May 1, 2024

Look for uses of check_yaml_has and pkgdown_config_href

Actually pkgdown_field() looks more reliable.

@hadley
Copy link
Member Author

hadley commented May 1, 2024

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()?

@hadley
Copy link
Member Author

hadley commented May 3, 2024

  • Need to create new utils-config.R (or maybe just config.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() maybe config_pluck_struct() and config_pluck_array_of_structs()? (With better names)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upkeep maintenance, infrastructure, and similar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant