voila-gridstack
voila-gridstack copied to clipboard
Best strategy to use a non-default template
What is the best strategy to use a custom voila template? Is it by setting voila_configuration.allow_template_override
to False and forcing the wanted template?
Comment
The behaviour of the notebook toolbar button and the editor toolbar button is slightly different (the editor set the template but not the notebook):
https://github.com/voila-dashboards/voila-gridstack/blob/0d729c9546451b44cc9ac5682f3ade0ef50d741f/packages/jupyterlab-gridstack/src/editor/components/notebookButtons.ts#L67
https://github.com/voila-dashboards/voila-gridstack/blob/0d729c9546451b44cc9ac5682f3ade0ef50d741f/packages/jupyterlab-gridstack/src/editor/toolbar/voila.tsx#L19-L21
We need to remove the one from the notebook since voila-preview
also adds this button (there is an issue #84).
Maybe we can change the icon and use this button to open voila with a gridstack
template like the one on the editor's toolbar.
What is the best strategy to use a custom voila template? Is it by setting voila_configuration.allow_template_override to False and forcing the wanted template?
We can open voila with a specific template by adding ?voila-template=gridstack
at the url.
Sorry the question was lacking clarity. In my company, we need to add branding to the template (like so many others). So forcing default gridstack
template is not acceptable. For now the configuration is done on the server side to force the company's template.