jupyterlite / jupyterlite-sphinx

Sphinx extension using JupyterLite to render Notebooks
https://jupyterlite-sphinx.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
68 stars 21 forks source link

Improve TryExamples customization #129

Closed steppi closed 9 months ago

steppi commented 10 months ago

Closes #122, #127

This PR updates TryExamplesDirective to use the standard method of allowing custom css in Sphinx to customize the buttons as suggested by Carreau here. It also adds customization of min_height to the config file try_examples.json so that the minimum height can bet changed at runtime. An option has been given to the directive to set the specific height of the iframe container for the embedded notebook and the min_height option has been removed. The specific height overrides the minimum height set in try_examples.json. I've also attempted to improve the documentation, and have added an example_class option to the directive which can be targeted in custom css as suggested by Carreau.

Carreau commented 9 months ago

Ok, let's get that in. I'll open an issue to think about validating the height and example_class

steppi commented 9 months ago

Thanks @Carreau!