Hosting your Jupyter Notebooks

In case you want to host a Jupyter Notebook in an interactive way, i.e. by embedding a hosted notebook on any existing website (e.g. this website hosted on github pages), you can do this easily in the following way.

  • Follow the instructions found on the official doc to deploy and host your own JupyterLite website on github pages.
  • Add (commit and push) any notebook you want to host to your repo.
  • To embed a live environment on your website, you can follow this guide.
  • To embed the Notebook in your existing website, simply include the following code snippet.
    <iframe
      src="https://your_username.github.io/your-repo/notebooks/index.html?path=path/to/notebook.ipynb"
      width="100%"
      height="500px"
    >
    </iframe>
    

    In my case, the result looks like this.