Can I load JS and CSS from local path in a Notebook export?

I’ve got a set of notebooks that we export to HTML (it’s part of a Jupyter Book project), and I’d like to start using Panel within them.

So far I’ve found two options:

inline = False

This works great, but loads the Panel JS and CSS from a CDN and the users won’t always have external network access

inline = True

Also works great, and gets rid of the CDN, but increases the size of ever page to multiple MB.

Is there any way of setting something like inline=“/static” to load all of the JS and CSS from a local path?

Are you converting the notebooks to HTML with JupyterBook or exporting with Panel’s .save() function?

… either way, the easiest solve might be to write a quick Python script to find and replace the CDN links in the HTML file.