Monday, February 13, 2017

Rendering Jupyter Notebooks (IPython Notebook) on Github Pages Sites

There are a number of solutions to render Jupyter notebooks on Github Pages sites.

  • Convert Jupyter notebooks to static html pages using nbconvert. For example, we have a Jupyter notebook file, my_example.ipynb. We run nbconvert as follows,
    
      jupyter nbconvert --to html --template full 2017-02-01-112657.ipynb 

    The above produce a whole HTML document including HTML header. If you wish to embed the notebook into your own page, you may use option basic as follows,
    
      jupyter nbconvert --to html --template basic 2017-02-01-112657.ipynb 
  • Another method is to use a Pelican extension, see ipynb_reader.
  • You can also use Jupyter's nbviewer service. See the following example and examine the URL.

    Example using nbviewer

Note that Github can now render a Jupyter notebook from its repository view. However, that is different from viewing a Jupyter notebook on a Github Pages site.

1 comment:

  1. Free easy & simple way to learn programming online we provide niit projects, assignments, cycle tests and much more..
    visit ====>>> https://githubhelp.blogspot.in

    ReplyDelete