Add shiny::bootstrapLib() as a dependency inside html_document_base()'s pre-processor#2049
Conversation
…l shiny::bootstrapLib() inside html_document_base()'s preprocessor (instead of at run()-time) The former time-point is too early -- it doesn't allow other output formats like flex_dashboard to modify the theme before passing it to html_document_base()
727b32f to
841f9f0
Compare
|
Ahh, in order for |
b7b8cf5 to
1886417
Compare
cderv
left a comment
There was a problem hiding this comment.
LGTM !
Thanks for your patience on this one @cpsievert and thanks for the work on bslib in rmarkdown !!
Add shiny bslib dependency inside html_document_base pre-process (rstudio#2049)
Merge remote-tracking branch 'rstudio_origin/master' into jg-devel * rstudio_origin/master: (26 commits) Use data-external=1 to prevent encoding by Pandoc of img src add `subdirs` documentation for site generator (rstudio#2058) fix: corrected typo in `ghostscript` (rstudio#2059) Add CoC contact email quillt has moved to rstudio/quillt fix invalid HTML code in shiny_prerendered documents (rstudio#1942) Allow pkgdown PR preview (rstudio#2055) Adding pkgdown site built by GHA (rstudio#1955) Add shiny bslib dependency inside html_document_base pre-process (rstudio#2049) start the next version CRAN release v2.7 place <div> in \code{} amend 62ae2ed and rstudio#1989: make sure output_format_filter is a function; testing NULL is not enough, e.g., the radix package still calls use CRAN releases of shiny and bslib tweak news Only keep the first url in citation (rstudio#2041) Fix for knit_print.data.frame (rstudio#2050) set gfm_auto_identifiers to input format if toc is TRUE (rstudio#2040) Enable pkgdown/downlit cross-package links to rmarkdown (rstudio#1843) update CONTRIBUTING.md ... # Conflicts: # DESCRIPTION
| @@ -134,16 +134,21 @@ run <- function(file = "index.Rmd", dir = dirname(file), default_file = NULL, | |||
| yaml_front <- if (length(target_file)) yaml_front_matter(target_file) | |||
| runtime <- yaml_front$runtime | |||
| theme <- render_args$output_options$theme | |||
There was a problem hiding this comment.
@cpsievert as I am going through shiny prerendered code base to understand better how it works, I am just wondering what this line is used for ? It does not seem to be used now with the PR changes.
Do you recall the aim of catching a special handling when theme would be passed inside rmarkdown::run(render_args=) ?
In #1706, to make
bslib::bs_themer()work withruntime: shinyI addedshiny::bootstrapLib()as a dependency whenrun()is first called. This ends up being is too early for output formats that wish to pass a modifiedthemetohtml_document_base()(the new version offlexdashboard::flex_dashboardwill do this).If you care for an example, first install rstudio/flexdashboard#308, then render a flexdashboard example. Note that with this PR will make it so the navbar's bg color reflects
$primary(instead of$dark)