coatless-quarto / pyodide

Community developed Quarto extension to enable interactive Python code cells in HTML documents using Pyodide
http://quarto.thecoatlessprofessor.com/pyodide/
65 stars 7 forks source link

[Q&A]: Pyodide for book pages #16

Closed m-r-k closed 6 months ago

m-r-k commented 6 months ago

What's your question?

If we create a quarto book with nice page navigation and have pyodide blocks on every page, the pyodide engine has to be loaded every time we change (sub)pages. Can this be done more efficiently?

Ideally, pyodide would only have to be loaded when the index.html is opened and all subpages could use it.

coatless commented 6 months ago

Unfortunately, each Quarto page is considered a separate instance. If you avoid splitting sections up and keeping chapters on a single long page, the engine will only need to load on one page.