Skip to content

iPython notebook viewer

Phil Hughes requested to merge ipython-notebook-viewer into master

What does this MR do?

Adds iPython notebook rendering with a Vue component (see the project https://gitlab.com/gitlab-org/notebooklab). All this code does it renders a different template for notebook files, fetches the raw JSON, parses the JSON and passes it into the Vue component.

It includes markdown rendering (without any GFM references) and syntax highlighting. The syntax highlighting uses our CSS to save anymore CSS being added in.

It is super simple at the moment and probably doesn't work with some more complex notebook files but this can be worked on in the NotebookLab component & then the version updated here when required.

The actual notebook code is tested in the notebooklab repo so the tests here just tests the notebook actually renders on the page rather than also checking how the notebook renders.

There is some simple error handling for when the file is either incorrect JSON or the request fails. I guess the plugin should handle render errors & then display an error there.

Screenshots (if relevant)

Screen_Shot_2017-03-23_at_17.31.09

Screen_Shot_2017-03-23_at_17.31.35

What are the relevant issue numbers?

Merge request reports