juniper icon indicating copy to clipboard operation
juniper copied to clipboard

Feature request: pre-baked outputs

Open jmansour opened this issue 5 years ago • 2 comments

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!

jmansour avatar Dec 06 '18 03:12 jmansour

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 :-)

choldgraf avatar Dec 29 '18 09:12 choldgraf

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

jmansour avatar Jan 07 '19 00:01 jmansour