-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify (some) voila options through URL parameters #105
Comments
(copypasted from a duplicated issue #299) I've been getting a lot of questions from people asking how they can share Voila dashboards that can both remove the code and show the code depending on the notebook. To follow up on this issue, it would be useful if one could pass options when Voila is being used as part of the Jupyter server (e.g. within Binder). Something like:
and then this could control some of the behavior from within a running jupyter session. This could then be used to control whether code is hidden or not, e.g.:
or
|
That would definitely be useful indeed. Perhaps there should also be a way to provide a spec of the options that can be controlled via the URL parameters ( These options could be requested from an endpoint ( {
"options": {
"strip_sources": {
"title": "Strip Sources",
"description": "Show or hide input cells",
"default": false,
"type": "boolean"
},
"theme": {
"title": "Theme",
"description": "Theme",
"default": "light",
"enum": ["light", "dark"],
"type": "string"
},
"template": {
"title": "Template",
"description": "Template name to be used by voila",
"default": "default",
"enum": ["default", "gridstack", "vuetify"],
"type": "string"
}
}
} |
@jtpio @maartenbreddels as of today, is there a way to pass the equivalent of CLI option |
No, but we could implement it similar to 3354ceb but except with the default being 'NOTEBOOK' or 'NO' (for security) |
@maartenbreddels oh, yes, please!! I have a real-world use case for it, namely for sharing the slideshow (on Binder) that @cgusb and I presented at BIDS ImageXD 2021: https://github.com/cgusb/solidification-tracking |
Why not on the command line btw? Why as a query parameter? |
The command line is enough with a local setup, but I'm referring to the Jupyter server case (as @choldgraf pointed out in a previous comment). People clicking on our Binder badge can view, navigate, interact with the presentation (as you expect with a Voilà app) but, because the code isn't displayed, they miss out on the tutorial aspect of the presentation. |
This can always be configured, like I do in https://github.com/maartenbreddels/voila-demo/blob/master/jupyter_config.json |
Is Binder actually picking up |
that is for app engine I think.
If you run voila standalone, rename the file to voila.json I think, but on mybinder it runs as a server extension. Hope that helps! |
Right (since Binder infers or tries different things, e.g.
Right, this is documented here: https://voila.readthedocs.io/en/stable/deploy.html?highlight=voila%20json#customizing-voila-on-binder
It works indeed! Basically I was hitting this exact issue: #826
For now, it definitely does, thank you so much! |
We could specify the template name through a URL parameter.
The text was updated successfully, but these errors were encountered: