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
I found myself confused recently when I was trying to demo creating a custom template in #126 . I'd run Voila with a custom template like --template=mytemplate, and everything would run fine, but the final output was not the HTML I expected.
Right now, this is because Voila simply appends the custom template path to the list of templates it expects. For me, this led to confusion because I was expecting Voila to error if it didn't find my template path. Instead, it just reverted to the default template.
What do folks think about raising an error in this case, rather than reverting to default? I feel like if somebody gives a custom template, they'd rather know that the path wasn't correctly found, rather than have it silently work, but not in the way expected.
The text was updated successfully, but these errors were encountered:
Yes, although it will be a bit tricky. We can check if the root dir exists, but nothing more, since we don't know what the reason is for choosing the template. It could be to override custom js, for 404 pages, or the voila.tpl template. But a voila template dir does not need to have a voila.tpl.
I found myself confused recently when I was trying to demo creating a custom template in #126 . I'd run Voila with a custom template like
--template=mytemplate
, and everything would run fine, but the final output was not the HTML I expected.Right now, this is because Voila simply appends the custom template path to the list of templates it expects. For me, this led to confusion because I was expecting Voila to error if it didn't find my template path. Instead, it just reverted to the default template.
What do folks think about raising an error in this case, rather than reverting to default? I feel like if somebody gives a custom template, they'd rather know that the path wasn't correctly found, rather than have it silently work, but not in the way expected.
The text was updated successfully, but these errors were encountered: