Skip to content

use external hosted nbviewer instance to preview ipynb files - #2301

Merged
curlyLasagna merged 1 commit into
mainfrom
feature/sc-39945/add-jupyter-notebook-preview-via-nbviewer
Sep 23, 2026
Merged

curlyLasagna merged 1 commit into
mainfrom
feature/sc-39945/add-jupyter-notebook-preview-via-nbviewer

Conversation

@curlyLasagna

@curlyLasagna curlyLasagna commented Sep 14, 2026

Copy link
Copy Markdown
Contributor
Screen.Recording.2026-09-14.at.12.30.25.PM.mov
  • Adds an iframe from nbviewer that renders notebooks from our materials by providing the S3 object URL
  • Took inspiration from microsoft previewer. If those external previewers go down, then nothing gets rendered. We could host an instance of nbviewer of our own and retrieve previews from there but it's another service we'd have to manage

Tested with a remote jupyter notebook file hosted on github. If you click the download button from a s3 object URL, it actually downloads the notebook

TODO:

  • I have run into materials where the author modified the filename to be ipynb.txt do we inform the user so they could change it or do we change their filename on their behalf?

<div
class="notebook-content"
[class.notebook-content--loading]="isLoading"
*ngIf="isNotebookPreview && notebookViewerUrl && !hasError">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@curlyLasagna
curlyLasagna merged commit 6912465 into main Sep 23, 2026
1 check passed
@curlyLasagna
curlyLasagna deleted the feature/sc-39945/add-jupyter-notebook-preview-via-nbviewer branch September 23, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants