Closed maelle closed 2 years ago
In the dark mode draft PR I created create_theme()
. https://github.com/r-lib/pkgdown/pull/1707/files#diff-e5b9c825f5f1d14686b4e41fda5e5b36139e75c6c2d571485d96c53dc331c8bdR466
Its arguments are pkg, bootswatch_theme, bs_version, mode. It returns "a sass::sass_bundle() (list-like) object.".
as_pkgdown()
.bslib stuff could happen in init_site()
:thinking:
A difference between the assets created by bslib and the logo is that there are several files created therefore several paths. Maybe init_site()
could store these paths in a text file so that render_page()
would read them (and add as many ../
as needed, as done for the logo).
Actually what htmltools::renderDependencies()
outputs are the tags to be put in head. I might resort to using regular expressions. :cold_sweat:
At the moment, the way
data_deps()
is called inrender_page()
mean bslib is called for every page which is extremely wasteful as we do not allow bslib variables in the YAML.So instead, should
data_deps()
be memoised? Or should there be more refactoring?data_deps()
depends ondepth
.