Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serving static assets in an offline .html file #1426

Open
LeonvanKouwen opened this issue Jun 19, 2020 · 1 comment
Open

Serving static assets in an offline .html file #1426

LeonvanKouwen opened this issue Jun 19, 2020 · 1 comment
Labels
type: enhancement Minor feature or improvement to an existing feature

Comments

@LeonvanKouwen
Copy link

In practice I find sharing a panel dashboard via an stand-alone html file very useful. Even if the dashboard requires an active python kernel, sharing a snapshot with responsive graphs is very nice. This applies in particular when you work with restricted data and/or when working with non-techies. There is already functionality for this, but this lacks serving static assets.

Describe the solution you'd like

The following code could is available

my_panel.save('index.html')

This could be extended like so:

my_panel.save('index.html', static_dirs={'custom_static': './examples'})

such that the saved html also includes references to the static files.
The output is a html file that refers to static assets in the same directory.

It is already possible to inline the panel/bokeh resources:

from bokeh.resources import INLINE
my_panel.save('index.html', resources=INLINE)

It would be nice if this also inlined the custom resources.

This is basically an extension to this issue

Describe alternatives you've considered

I have cut and paste code in the html and this made it work. This shows there is no fundamental issue, but it is not very convenient of course.

@philippjfr philippjfr added the type: enhancement Minor feature or improvement to an existing feature label Jun 19, 2020
@Niko-La
Copy link

Niko-La commented May 5, 2022

is there a way to get statci html page of a dashboard?
have the dashboard working fine using panel serve --show demo.ipynb
looking to host using netlify or vercel etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants