Update configuration values in the _webrarian.yml file. The file is
rewritten as a whole, so comments in it are not preserved.
Examples
# Work in a throwaway collection under tempdir()
collection <- file.path(tempdir(), "webrarian-settings-demo")
catalog(collection)
#> ✔ Created directory /tmp/RtmpQU25pJ/webrarian-settings-demo
#> ✔ Created _webrarian.yml
#> ✔ Added "_site/" and ".webrarian/" to .gitignore
#> ✔ Cataloged webrarian collection: "webrarian-settings-demo"
#>
#> Next steps:
#> Move into the collection: `setwd("/tmp/RtmpQU25pJ/webrarian-settings-demo")`
#> Acquire packages: `webrarian::acquire_package("dplyr")`
#> Acquire files: `webrarian::acquire_file("data/")`
#> Bind: `webrarian::bind()`
#> Reading room: `webrarian::reading_room()`
#> ℹ Or pass `path` to each call, e.g. `webrarian::bind(path =
#> "/tmp/RtmpQU25pJ/webrarian-settings-demo")`
settings_set(collection, "webr.version" = "0.6.0")
settings_set(collection, "project.name" = "my-app", "build.output-dir" = "public")
config <- collection_settings(collection)
settings_get(config, "project.name")
#> [1] "my-app"
settings_get(config, "build.output-dir")
#> [1] "public"
unlink(collection, recursive = TRUE)