Open banesullivan opened 5 years ago
All of our current documentation at panel.pyviz.org is based on panels that are rendered into documentation using Sphinx, so in that sense, yes it's possible. :-) But it sounds like you want the deployed version of the dashboard, created without a notebook, rendered into HTML? I don't think we have a workflow for that already. A good starting point would maybe be for bokeh html file.py
(or preferably the as-yet-not-implemented panel html file.py
) to work, but I just get ERROR: OutputDocumentFor expects a sequence of Models
if I try that with a Panel dashboard that does work with panel serve file.py
or bokeh serve file.py
.
I do think @banesullivan just wants static export. In Panel itself we just build notebooks into docs but it shouldn't be too difficult to make a small sphinx directive that renders and embeds a panel.
Yes! I’d love some sort of Sphinx directive that would render and embed a panel! Is this something that might be easy for you all to implement?
Basically, I just want to have some example code that creates a panel in my rst
Sphinx documentation and then have a directive that will run that code and embed the output when creating the HTML pages
I see that you all are using nbsite.gallery
and that the panels are fully embedded in the docs... would it be possible to make a scraper for sphinx_gallery.gen_gallery
to do the same thing?
https://github.com/pyviz/panel/blob/4ab07496fbe549c69d45683217d33783e839f077/doc/conf.py#L21
pkrull is also asking how he can use Panel with Sphinx here https://discourse.holoviz.org/t/how-to-use-sphinx-gallery-with-panel/6035
For sphinx-gallery there is now a feature request and proof of concept in https://github.com/holoviz/panel/issues/5519.
Is it possible to use
panel
with Sphinx documentation to create a panel that can be saved and rendered in the documentation of a project for examples?For example, I'd love to use the new VTK capabilities of
panel
to have live-ish demos on thevtki
documentation: http://docs.vtki.orgPerhaps it would be possible to run the code on the documentation page and save the output panel in the HTML documentation much like how this currently works for Jupyter notebooks?