Repository navigation
Releases: chizkidd/nbview
Release list
v0.11.0
Improves accessibility, adds notebook search and saved widget rendering, introduces privacy-preserving link previews, and speeds up initial page loading.
Accessibility
- Skip link. The first Tab stop on every page is now "Skip to content", which moves keyboard focus to the main content without touching the address.
- Focus no longer gets lost when a view changes (opening a notebook, going back, switching to Compare): it moves to the main region instead of dropping to the top of the page.
Added
- Find in notebook. A Find button (or press
/) opens a search bar that highlights every match in code, text and outputs, shows "3 of 12", and steps through matches with Enter, Shift+Enter or the arrow buttons. Unlike the browser's find, it works on cells scrolled far off screen in large notebooks, and it skips code or outputs you have hidden. Matching ignores case and treats what you type literally. Escape closes it. Browsers without the highlight feature outline the cell instead. llms.txtdescribing the site, how to build links to notebooks, and where an automated reader should get notebook contents (raw files on GitHub), for AI agents and tools that look for it.- Saved widgets are shown. ipywidgets outputs (tqdm progress bars, sliders, dropdowns, labels, HTML, and the boxes holding them) now appear read-only from the widget state saved in the notebook, instead of a bare text description. Passwords are never shown, and widgets with no saved state keep their text fallback or a short note.
- Link previews. Links like
nbview.org/github/owner/repo/blob/main/notebook.ipynbnow show a card with the notebook's file name and repo when pasted into Slack, Reddit, X, Discord and similar. The card is built from the address only: the server never fetches or reads the notebook. "Copy link" and the cell#button copy this form for GitHub notebooks. People opening the link are redirected to the viewer as before.
Changed
- Faster first load. The page's scripts no longer block it from showing, and syntax highlighting and math (about 120 KB) load when a notebook opens instead of with the home page. On a throttled phone profile the home page shows its content in about 0.6 s instead of 1.2 s; opening a notebook takes the same time as before.
Full Changelog: v0.10.0...v0.11.0
v0.10.0
Share a link to one cell, and run Plotly charts safely.
- Link to a single cell: every cell has a # button that copies a ?cell=N link. Opening it scrolls to and highlights that cell.
- Interactive Plotly charts: figures saved as data show a Run interactive chart button. Nothing runs until you click, and the chart runs in an isolated frame with no access to the page, your storage, cookies or the network.
- http:// notebook links (including nbviewer /url/ links) now load over https.
- Tests now run under the site's real security headers.
v0.9.0
More ways into Compare, and word-level highlights.
Added
- Changed words are highlighted inside changed lines in Compare, so a one-word edit stands out in a long line.
- Compare works with gists. Paste a gist link (or
gist.github.com/user/id/revision) as either notebook. On a gist notebook, the Compare button can pick an earlier revision of that gist. - Compare from the notebook you have open. A local file or a notebook opened by URL now has a Compare button that carries it over to the Compare page as the first notebook, so you only add the second.
Full changelog: https://github.com/chizkidd/nbview/blob/main/CHANGELOG.md
v0.8.0
Compare any two notebooks, and diffs that read like GitHub's.
Added
- Compare two different notebooks. The Compare page has a new Two links tab. Paste, for each side, a GitHub notebook link, a raw link,
owner/repo/path/to/notebook.ipynb(uses the default branch), or any direct.ipynbURL. The two notebooks can be in the same repo or in different repos. On a GitHub notebook, the Compare dialog also accepts "a different notebook". Compare links can be shared:nbview.org/#/compare/links/<first>/<second>. Gist links are not supported in Compare yet. - Swap sides (for two notebooks) and Swap versions (for two versions of one notebook) buttons.
Changed
- Compare diffs look like GitHub's: long lines wrap instead of scrolling one by one, each line shows its old and new line number, and the side-by-side view uses the full width of the page.
- Compare always opens in the unified (one column) view, on any screen size. The toolbar reads Unified, then Side by side, and a side-by-side choice is still remembered.
Full changelog: https://github.com/chizkidd/nbview/blob/main/CHANGELOG.md
v0.7.0
See exactly what changed between two versions of a notebook.
Added
- Compare:
- On any GitHub notebook, Compare lets you pick a branch, tag or commit to compare with, or choose from the file's recent commits.
- On the home page, Compare two notebooks takes two local
.ipynbfiles, which never leave your browser. - Changed cells show a line-by-line diff, side by side or in one column (your choice is remembered, and phones get one column). Unchanged cells collapse, long unchanged runs of lines fold, and Previous and Next change buttons jump between changes.
- Output changes are optional (Show output changes).
- Compare links can be shared:
nbview.org/#/compare/github/owner/repo/old...new/path/to/notebook.ipynb.
Full changelog: https://github.com/chizkidd/nbview/blob/main/CHANGELOG.md
v0.6.0
Find your way around long notebooks, and hide outputs when you only want the code.
Added
- Contents menu on notebooks that have markdown headings (levels 1 to 4): click an entry to jump to that heading. It fills in as the notebook renders.
- Hide outputs toggle next to Hide code. The HTML export keeps the choice.
Changed
- Escape or a click elsewhere closes any open toolbar menu.
Full changelog: https://github.com/chizkidd/nbview/blob/main/CHANGELOG.md
v0.5.1
Hardening pass from the adversarial QA report, self-hosted fonts, and cross-browser tests.
Fixed
- Very large notebooks render much faster: 5,000 cells went from about 19 s to about 3 s, and the first cell appears in half a second.
- A corrupted "recently opened" list no longer breaks the home page, and a huge link is no longer saved there (it could fill the browser's storage and put a megabyte-long name in the tab title). File names are capped at 120 characters.
- A GitHub token with an invisible or disallowed character is refused when saved, with an explanation. An already saved one gets a clear message instead of "couldn't reach GitHub".
- nbformat 3 notebooks with odd heading levels or empty entries open instead of failing, and a JSON file that is not a notebook says so.
- Odd answers from the GitHub API give a clear message instead of a stuck spinner or the word "undefined". GitHub and notebook requests time out after 20 and 60 seconds.
data:,javascript:andfile:links are refused clearly.- Colab GitHub links open the notebook,
git@github.com:owner/repo.gitis understood, and Google Drive and Colab Drive links explain why they can't be opened. - Long file names no longer push the page sideways on phones.
- Accessibility: sideways-scrolling code blocks can be reached with the keyboard and show a focus ring, and two colors are slightly darker to reach 4.5:1 contrast.
Changed
- A link to a non-notebook file in a repo (for example a README) now opens its folder instead of showing a JSON error.
- Page fonts are served from nbview.org instead of Google Fonts, so visiting no longer sends anything to Google.
Added
- Regression tests (
npm test), also in Firefox and Safari's engine, plus an optional smoke test against the real GitHub. - A Privacy section in the README,
MAINTENANCE.mdandtests/README.md.
Full changelog: https://github.com/chizkidd/nbview/blob/main/CHANGELOG.md
v0.5.0
Export a notebook as a script, Markdown, HTML or PDF, and nbviewer's gist and URL links now work too.
Added
- Export menu on every notebook:
- Python script (.py), for Python notebooks. IPython magics and shell commands become comments.
- Markdown (.md), with code fences, text outputs and images.
- HTML page (.html): one self-contained file with a strict Content-Security-Policy, so it carries no scripts.
- Print / Save as PDF.
Everything is built in your browser. Nothing is uploaded.
- Line numbers and Wrap lines toggles for code cells, remembered in your browser.
- Print styles: no header or buttons, wrapped code, light colors.
- nbviewer
/gist/...,/url/...and/urls/...links now work by swappingnbviewer.orgfornbview.org, not just/github/.... You can also paste them into the box. sitemap.xml, linked fromrobots.txt.- A note that nbview is independent and not affiliated with Project Jupyter or nbviewer.
Changed
- The notebook title has its own row above the toolbar, so the longer button row can't squeeze it.
- Math fonts can be loaded from other origins, so saved HTML exports keep their equations.
- README: the folder tree is annotated in place, with upkeep notes in a Maintenance section.
Full changelog: https://github.com/chizkidd/nbview/blob/main/CHANGELOG.md
v0.4.0
Open notebooks in a real Jupyter, plus site housekeeping.
- Open in Binder button on notebooks opened from GitHub. It launches the notebook in standard JupyterLab on mybinder.org, so ipywidgets, Plotly and Bokeh outputs can run. Binder builds the environment from the repo's own files (
requirements.txt,environment.yml), so a repo without them opens with only the default libraries. - The note under JavaScript-only outputs now says "Open in Binder or Colab to run it".
robots.txtthat allows all crawlers. Before this,/robots.txtreturned the home page..well-known/security.txtpointing to GitHub's private vulnerability reporting. It expires on 2027-10-07 and needs renewing yearly.- README updated.
v0.3.0
Safer, harder to freeze, and no more third-party scripts.
Security
- Notebook HTML can no longer contain forms, text boxes, buttons or other form controls, so a notebook can't show a fake sign-in box.
- Author CSS keeps colors, borders, fonts and layout but loses positioning,
z-indexand anything that loads a URL. A notebook can't cover the page or restyle the header, and each cell's styles apply to that cell only. - Notebooks opened by URL accept only
httpandhttps.data:,javascript:andfile:links show "Unsupported link". - New
_headersfile: strict Content-Security-Policy (no form submissions, no framing, scripts only from this site and the Cloudflare analytics script),X-Frame-Options,Permissions-Policy, referrer policy. - The libraries are served from this site (
assets/vendor/), not cdnjs, at current versions with no known advisories: marked 18.0.14, DOMPurify 3.4.16, highlight.js 11.12.0, KaTeX 0.19.0.
Added
- Output over 1 MB sits behind a "Show output" button.
- Code cells over 200 KB are shown without syntax colors.
- An equation over 4,000 characters or nested over 40 levels is shown as plain TeX, as is anything past the first 2,000 equations in a notebook.
- Local files get the same 10 MB warning as links.
- A cell that fails to render shows "This cell couldn't be displayed" with its raw source in a collapsible. A broken output shows its own notice and the rest of the cell still renders.
- New link-preview image, in light and dark versions.
Fixed
- Output images get their size up front, so the page no longer jumps as images load.
- Long notebook titles wrap at underscores and dots, in the notebook's own font.
- pandas Styler tables keep their colors. A leading
<style>block used to be dropped. - Error and size-warning pages have a proper top-level heading.
Changed
- Headings no longer get ids from the markdown library. Table-of-contents links still scroll correctly.