posit-dev / r-shinylive

https://posit-dev.github.io/r-shinylive/
Other
147 stars 15 forks source link

feat: Customize export template and parameters #96

Closed gadenbuie closed 3 weeks ago

gadenbuie commented 1 month ago

Fixes #32 Pairs with https://github.com/posit-dev/shinylive/pull/144

Adds template_dir and template_params to shinylive::export().

I initially used glue::glue() for the interpolation, but realized while working on the Python side of this change that that it won't be easy to replicate glue's interpolation behavior in Python.

Instead, I decided to use whisker so that both implementations can use mustache for templating. I think this is a net win, as it allows for more powerful templating for power users without overly complicating the feature.