-
Notifications
You must be signed in to change notification settings - Fork 336
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
fix: use BS version from template package again #2441
Conversation
Now I also realize that if the pkgdown package template is used by a central docs building thing, it's not too hard to set the BS version in an override. 😅 |
This section https://pkgdown.r-lib.org/articles/customise.html#template-packages states that one can use the configuration file of the template package to set the Bootstrap version. |
@@ -32,6 +32,9 @@ as_pkgdown <- function(pkg = ".", override = list()) { | |||
) | |||
meta <- modify_list(template_config, meta) | |||
|
|||
# BS version can also be set by template package itself | |||
bs_version <- get_bootstrap_version(list(meta = meta)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this function is the only place that get_bootstrap_version()
is used, I think it might be slightly clearer to do something like:
# Update bs_version if set in template
bs_version <- bs_version %||% template_config$bootstrap
Thanks both!! |
Fix #2440 cc @gadenbuie
@Bisaloo could you please confirm it also works for you?
This is not an elegant fix because of getting the BS version twice. I can also imagine it'd make sense to ask maintainers of template packages to ask their users to set the BS version? But it means more work if updating the BS version in the template package so I would not appreciate this outcome as a template package maintainer. 😹