Skip to content

Add Jupyter Notebook to docs page

Mason McElvain edited this page Sep 20, 2020 · 3 revisions

Jupyter in CSAI Docs

  1. If your notebook exists in the cloud, download it.
  2. Open the Github Gist page. Gists allow you to host small pieces of example code with your Github account.
  3. Drag and drop your notebook onto the Gist page. This will turn the notebook into an accessible gist.
  4. Grab the reference to your gist with the 'Share' dropdown. All we need is the portion of the link with your username and gist id:
// If you copy this from the url:
https://gist.github.com/Waidhoferj/ae385ac4babafe33fb86ae9bd83b2f0e
// The only part we need is this:
Waidhoferj/ae385ac4babafe33fb86ae9bd83b2f0e
  1. On your CSAI docs documentation page, import ReactEmbedGist and add the tag that we copied above to the gist attribute:
import ReactEmbedGist from 'react-embed-gist';
<ReactEmbedGist gist="Waidhoferj/ae385ac4babafe33fb86ae9bd83b2f0e"/>
  1. Spin up the dev server and see your gist in the page!
Clone this wiki locally