Jupyter-Sphinx Tool Chain

You can create a tool chain that allows you to author documents in Jupyter notebooks and publish with Sphinx.

To Install:

  1. Python 3.6 (programming language environment used to run Sphinx and Jupyter). I recommend that you grab Anaconda Python 3.6. It’s big, but it will save us some steps by virtue of its large out-of-the-box module library. It already contains Jupyter, which will be a big part of our conversation. Be sure it falls on your path before any existing Python with which python (Mac/Linux) or where python (Windows).
  2. Sphinx (html site builder). With Python above installed, install Sphinx as a Python module with pip install -U Sphinx. -U will update the module if it already exists.)
  3. Install [Pandoc]((https://github.com/jgm/pandoc/releases) . Ensure pandoc is on your system path with which pandoc (Mac/Linux) or where pandoc (Windows).
  4. Run pip install nbsphinx sphinx-bootstrap-theme to install some useful modules.

To start using Jupyter Notebook:

  1. Open another terminal.
  2. Change directory to you Sphinx root.
  3. Run Jupyter notebook with jupyter notebook.
  4. It will launch a browser page with Jupyter.

To Run Sphinx:

  1. make html
  2. cd build/html
  3. python -m http.server
  4. Access the generated doc with a browser at http://localhost:8000