-
Notifications
You must be signed in to change notification settings - Fork 2
Add Jupyter Notebook to docs page
Mason McElvain edited this page Sep 20, 2020
·
3 revisions
- If your notebook exists in the cloud, download it.
- Open the Github Gist page. Gists allow you to host small pieces of example code with your Github account.
- Drag and drop your notebook onto the Gist page. This will turn the notebook into an accessible gist.
- 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
- On your CSAI docs documentation page, import
ReactEmbedGist
and add the tag that we copied above to thegist
attribute:
import ReactEmbedGist from 'react-embed-gist';
<ReactEmbedGist gist="Waidhoferj/ae385ac4babafe33fb86ae9bd83b2f0e"/>
- Spin up the dev server and see your gist in the page!