r-lib / pkgdown

Generate static html documentation for an R package

Home Page:https://pkgdown.r-lib.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bslib 0.6.0 changes default theme

jabenninghoff opened this issue · comments

As documented in the bslib 0.6.0 release notes,

bs_theme() now defaults to preset="shiny". This provides an additional set of theming defaults and rules that make it easier to create Shiny apps (in particular, dashboards) that look good out of the box. To revert to the previous behavior, set bs_theme(preset="bootstrap").

This changes the appearance of pkgdown sites using the default Bootstrap 5 theme. Since pkgdown does not support Shiny directly, I would expect pkgdown to continue to use bs_theme(preset="bootstrap") by default.

To reproduce, create a pkgdown site with the following _pkgdown.yml:

url: ~
template:
  bootstrap: 5

As a workaround, the preset can be added to _pkgdown.yml which renders the site using the default Bootstrap 5 theme:

url: ~
template:
  bootstrap: 5
  bslib:
    preset: bootstrap

Can the behavior be changed so that bs_theme(preset="bootstrap") is selected by default? If needed, use of the Shiny preset could be specified in _pkgdown.yml:

url: ~
template:
  bootstrap: 5
  bslib:
    preset: shiny