project-pages icon indicating copy to clipboard operation
project-pages copied to clipboard

Documentation on how to integrate Jupyter Notebooks

Open jdpigeon opened this issue 8 years ago • 6 comments

I've just started using project-pages for a project and am loving it so far. The only big question that's puzzling me is how you've generated JSON versions of Jupyter notebooks in the example project? I know this info is upcoming in the wiki, but is there any pointers you can give me on how to run your jupyter notebook JSON converter?

Thanks

jdpigeon avatar Aug 07 '17 20:08 jdpigeon

Due to assumptions that Jekyll made at the time, I had to use the data folder for this functionality. There is probably a better way to do this now.

All you need to do is drag and drop a jupyter notebook to the data folder, then rename from ipynb to json. There is no conversion of any kind otherwise.

When you make a new notebook post, you can refer to the notebook you want in the front matter parameters.

On Aug 7, 2017 3:36 PM, "Dano Morrison" [email protected] wrote:

I've just started using project-pages for a project and am loving it so far. The only big question that's puzzling me is how you've generated JSON versions of Jupyter notebooks in the example project? I know this info is upcoming in the wiki, but is there any tips you can give me?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/projectpages/project-pages/issues/95, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5XE1D9cmdiLVL-L1jbJ3ZoajJWv6Bcks5sV3U1gaJpZM4Ov6yc .

ahmetcecen avatar Aug 07 '17 22:08 ahmetcecen

Got it! That's very easy.

I could make an addition to the wiki on how to add notebooks if you'd like.

Cheers

jdpigeon avatar Aug 08 '17 17:08 jdpigeon

An option would be to run jupyter nbconvert --json _data/*.ipynb to replace the drag and drop.

Is there a way to modify Jekyll collections to identify the ipynb files as json?

tonyfast avatar Aug 08 '17 18:08 tonyfast

I don't believe there is a way to do that without modifying Jekyll itself, which would prevent GitHub deployment.

The alternative is to parse the text manually from the ipynb file. Problem is this probably would require exploiting and chaining some unintended use cases in Jekyll, like using the notebooks as includes for example.

The data folder seemed like the optimum way out at the time.

ahmetcecen avatar Aug 08 '17 18:08 ahmetcecen

@jdpigeon Sure, feel free to improve on the wiki. I pretty much ran out of time to make many changes or additions there as I graduated recently. It is unlikely that I will be able to improve much more on this.

ahmetcecen avatar Aug 08 '17 18:08 ahmetcecen

Hi. Where can I access the wiki and/or ppguide mentioned? The provided link (https://projectpages.github.io/ppguide/) return error.

Thanks.

turzobose avatar Dec 10 '20 11:12 turzobose