Hi, I’m curious to know if there’s an example of how to run a notebook locally / outside of observablehq.com.
I’ve seen the examples of how to import selected cells from a notebook into another web page / application, but is there a way to replicate the entire notebook locally? I’d like to archive some of the notebooks I’ve made so that I can come back to them at a later point in time.
See @mbostock’s post for a better way to get a runnable version of your notebook! Perhaps I’m misunderstanding your question, but if you know how to embed selected cells, then you can embed your entire notebook by deciding to embed every cell.
More explicitly, the easiest way I know of to embed selected cells from a notebook into other (non-Observable notebook) web pages is to export your entire notebook (à la the “Downloading and embedding notebooks” tutorial) and write a script using the notebook-runtime module to render the specific cells you want.
If what you’re asking is how to embed the Observable website’s exact interface to your notebook (including editing, etc.), then unfortunately, that’s not possible (yet?); at least not without reverse-engineering a lot of the interface / look-and-feel on your own, as well as doing some amount of parsing and processing of your exported notebook source.
If you click Download tarball from the notebook menu, the resulting tarball (.tgz) will contain an index.html that renders the entire notebook to the page.