posit-dev / py-shinylive

Python package for deploying Shinylive applications
https://shiny.posit.co/py/docs/shinylive.html
MIT License
42 stars 4 forks source link

feat: Update export command to use `--template-dir` and `--template-param` #32

Closed gadenbuie closed 3 weeks ago

gadenbuie commented 4 weeks ago

Pairs with https://github.com/posit-dev/shinylive/pull/144 Helps with https://github.com/posit-dev/shinylive/issues/110

This PR adds template_dir and template_params to shinylive.export() and as command line arguments in shinylive export.

We now also use mustache for templating via chevron to render the templates. In addition to being a more powerful templating engine, this also allows us to use the same template logic for both R and Python. chevron appears to be under-maintained but stable and recommended from the mustache frontpage.