You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To set a custom voila template, there are two options:
use the voila_configuration args: voila --template=my-template
set the name of the template in the notebook metadata:
{
"voila" : {
"template" : "my_template"
}
}
However, I have found that when I set the template in the notebook metadata, the template_dirs variable doesn't take these changes into account, instead, it uses the voila_configuration args, which causes the start method diverges because it ends up using two different paths.
Apparently, this bug mainly affects the static_paths, causing 404 errors in templates that uses them. I suspect it might also cause other, less noticible issues.
Reproduce
create a simple notebook and set any other default template, for example: classic.
Second log, (which is created by nbconvert and reads the notebook):
Expected behavior
The template should work when it is set in the notebook metadata.
Solution
If there's no time to address this error, I could open a PR but I would need some guidance, I think we could read the notebook in the setup_template_dirs (as a json file) and use the template name?
The text was updated successfully, but these errors were encountered:
Description
To set a custom
voila
template, there are two options:voila_configuration
args:voila --template=my-template
However, I have found that when I set the template in the notebook metadata, the
template_dirs
variable doesn't take these changes into account, instead, it uses thevoila_configuration
args, which causes thestart
method diverges because it ends up using two different paths.see (
voila/voila/app.py
Line 541 in 7596c4f
Apparently, this bug mainly affects the
static_paths
, causing 404 errors in templates that uses them. I suspect it might also cause other, less noticible issues.Reproduce
classic
.voila --debug test.ipynb
First log shows "using
lab
template)Second log, (which is created by nbconvert and reads the notebook):
Expected behavior
The template should work when it is set in the notebook metadata.
Solution
If there's no time to address this error, I could open a PR but I would need some guidance, I think we could read the notebook in the
setup_template_dirs
(as a json file) and use the template name?The text was updated successfully, but these errors were encountered: