Various methods to migrate an Observable notebook to a standalone webpage.
The joyplot notebook is used as an example throughout this repository.
Examine the results of the migration to a standalone application:
- standalone joyplot using the "Bundle" method
- standalone joyplot using the simpler "Default Observable export" method.
- standalone joyplot using the simpler "Request Observable API" method.
- standalone joyplot using the "Rewrite from scratch" method.
An Observable notebook can be run as a standalone application using the
@observable/runtime
library,
outside of the Observable platform.
The recommended method is to bundle all the modules into a single JavaScript file: "Bundle" method
See it in action by Philippe Rivière on the Spherical contours notebook:
- Original notebook [@observablehq]
- Self-contained project [@github]
- Self-contained app [@now.sh]
- blog post
Two simpler methods are possible. The first one is to download and extract tgz from Observable notebook to use the default index.html file provided in the tgz file: "Default Observable export" method
The second simpler method is to get JavaScript modules from api.observablehq.com at runtime: "Request Observable API" method
A totally different approach to migrate an Observable notebook to a standalone application is to rewrite the code from scratch: "Rewrite from scratch" method
- "How-To… Embed an Observable Notebook in your CMS": notebook cells embedded into a Jekyll blog,
- Downloading and Embedding Notebooks: official Observable documentation,
- zzzev/observable-press: An opinionated way to publish Observable (observablehq.com) notebooks: an untested alternative method.
Project developed for the LIRIS M2i project by Sylvain Lesage with the help of Philippe Rivière, Romain Vuillemot and Mike Bostock.