diff --git a/share/jupyter/voila/templates/base/voila_setup.macro.html.j2 b/share/jupyter/voila/templates/base/voila_setup.macro.html.j2 index 1e615ebd0..035427fa7 100644 --- a/share/jupyter/voila/templates/base/voila_setup.macro.html.j2 +++ b/share/jupyter/voila/templates/base/voila_setup.macro.html.j2 @@ -1,4 +1,5 @@ -{%- macro voila_setup(base_url, nbextensions) -%} +{# Macro for loading the notebook extensions #} +{%- macro voila_setup_nbextensions(base_url, nbextensions) -%} {%- endmacro %} + +{# For backward compatibility #} +{%- macro voila_setup(base_url, nbextensions) -%} +{{ voila_setup_nbextensions(base_url, nbextensions) }} +{%- endmacro %} + +{# Helper functions for updating the loading text #} +{%- macro voila_setup_helper_functions() -%} + +{%- endmacro %} diff --git a/share/jupyter/voila/templates/lab/index.html.j2 b/share/jupyter/voila/templates/lab/index.html.j2 index bc8fe1510..ca69674e5 100644 --- a/share/jupyter/voila/templates/lab/index.html.j2 +++ b/share/jupyter/voila/templates/lab/index.html.j2 @@ -1,7 +1,7 @@ {%- extends 'nbconvert/templates/lab/index.html.j2' -%} {% import "spinner.macro.html.j2" as spinner %} {% import "log.macro.html.j2" as log %} -{% from 'voila_setup.macro.html.j2' import voila_setup with context %} +{% from 'voila_setup.macro.html.j2' import voila_setup_helper_functions, voila_setup_nbextensions with context %} {%- block html_head_js -%} {%- block html_head_js_requirejs -%} @@ -40,15 +40,7 @@ {% endif %} {{ spinner.html() }} - +{{ voila_setup_helper_functions() }}