-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running with Thebelab #23
Comments
Really interesting question @psychemedia, and thanks for raising it. I'm reluctant to add many third-party-specific features to notebook.js, for fear of long-term bloat and consequences. I would, however, like to make it as easy as possible for folks to customize and extend the core functionality. To that end:
What do you think of this approach? Are there other approaches that would make extending |
I've done a demo here that uses a modified notebook.js with a very simplistic approach to code rendering and a tweak to the The demo also has a minimal proof of concept for saving out the code from the uploaded page in case it is changed. (I figure if code cells are uniquely identified in the original notebook, we should be able to treat the original notebook as a template and update code cells with any modifications.) The inspiration for saving out was my wondering whether I could use I quite understand not wanting to overcomplicate |
Very neat, and many thanks for providing that demo/example. I think it does make sense to add some sort of plugin/extension mechanism. In your ideal world (not that I can promise to achieve it), what would the interaction/interface look like for a plugin-writer like yourself? What sort of API would you want exposed? |
I have no idea! (I'm an optimistic tinkerer rather than a developer who knows how to do things properly!) Will ponder it... I'll also see if I can do another mockup using nbinteract and see if a natural way of supporting both nbinteract and Thebelab in a similar way falls out... |
Have you looked at providing additional support for ThebeLab within
notebookjs
so that a user could run the code in the page against a remote kernel of Binderhub launched kernel?The following minor change seems to work.
In
nb.Input.prototype.render
, present the code as simply as possibly, in an appropriately configured<pre>
tag (ThebeLab looks for code contained in a<pre data-executable="true" data-language="python"></pre>
tag):Add in some ThebeLab config information to the
index.html
page:Then crib from the ThebeLab docs to add a simple button to the top of the
index.html
page to enable the code for execution:The text was updated successfully, but these errors were encountered: