executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
431 stars 197 forks source link

Launch button drop-down can show up even when no links are available #694

Closed choldgraf closed 1 year ago

choldgraf commented 1 year ago

Our check for whether to include launch buttons just checks whether any launch button config is present. However this means somebody can specify some config, but none that result in valid launch buttons, and this will result in an empty drop-down.

This is relevant because jupyter book sets some default config, and so launch_buttons will always be present.

We should improve the check so that launch buttons only show if a valid button link can be created.