ines / juniper

🍇 Edit and execute code snippets in the browser using Jupyter kernels
https://ines.github.io/juniper/
MIT License
224 stars 38 forks source link

Feature request: pre-baked outputs #1

Open jmansour opened 5 years ago

jmansour commented 5 years ago

Hi there.

Cheers for your work on juniper, it looks great. I'm going to try to roll it out to enable live documentation for our project.

Currently I'm thinking to configuring the pages to have expected cell outputs included statically directly after the juniper cells so people can review the page non-interactively, and also so we can potentially render pages out into a pdf document. While this is sufficient, it would certainly be nicer if juniper could be fed pre-baked outputs that it could display as default when a page is initially loaded. So if a user runs a cell interactively, the pre-baked output would be replaced with the live output.

Do you think this would be do-able without huge effort? Thanks for your efforts in any case!

choldgraf commented 5 years ago

In my experience, the best way to do this is to write some light-weight javascript that initializes juniper and does some other stuff in the process when this happens (like remove pre-rendered outputs etc).

playing around with this myself here: https://github.com/choldgraf/jupyter-book/pull/66

in case you're interested :-)

jmansour commented 5 years ago

Thanks for the heads up @choldgraf. I'll take a look.