Skip to content

Commit

Permalink
Fixup nbextension
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainCorlay committed Jun 3, 2019
1 parent 4e983d9 commit 3c32ad2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ def run(self):

data_files = [
('etc/jupyter/jupyter_server_config.d', ['etc/jupyter/jupyter_server_config.d/voila.json']),
('etc/jupyter/jupyter_notebook_config.d', ['etc/jupyter/jupyter_notebook_config.d/voila.json'])
('etc/jupyter/jupyter_notebook_config.d', ['etc/jupyter/jupyter_notebook_config.d/voila.json']),
('etc/jupyter/nbconfig/notebook.d', ['etc/jupyter/nbconfig/notebook.d/voila.json'])
]

# Add all the templates
Expand Down
4 changes: 1 addition & 3 deletions voila/static/nbextension.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
define(['jquery', 'base/js/namespace'], function($, Jupyter) {
"use strict";
var open_voila = function() {
let notebook_path = Jupyter.notebook.notebook_path;
let voila_path = notebook_path.slice(0, notebook_path.length-6); // without .ipynb
let voila_url = Jupyter.notebook.base_url + "voila/render/" + voila_path;
let voila_url = Jupyter.notebook.base_url + "voila/render/" + Jupyter.notebook.notebook_path;
window.open(voila_url)

}
Expand Down

0 comments on commit 3c32ad2

Please sign in to comment.