You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now sphinx-thebe will only load if it detects ThebeButtonNode on a page. However, if a theme is using sphinx-thebe to load thebe, but not the ThebeButtonNode, then thebe won't load for them.
We should find some way around this and also determine how common of a use-case this is.
Value / benefit
This is useful for anyone that wants to piggy-back off of this extension but without using the directives provided by this theme. A good examples of this is the Sphinx Book Theme, which manually activates thebe:
I have refreshed my memory of how sphinx-thebe works, and indeed understand the problem now, with the selector being invisible as long as we only have the AST.
Would it make sense to change the sphinx-thebe configuration to take a node or a list of nodes instead, and add the class = 'thebe-container' attribute or something like that to those nodes?
Description / Summary
Right now
sphinx-thebe
will only load if it detectsThebeButtonNode
on a page. However, if a theme is usingsphinx-thebe
to loadthebe
, but not theThebeButtonNode
, then thebe won't load for them.We should find some way around this and also determine how common of a use-case this is.
Value / benefit
This is useful for anyone that wants to piggy-back off of this extension but without using the directives provided by this theme. A good examples of this is the Sphinx Book Theme, which manually activates thebe:
https://github.com/executablebooks/sphinx-book-theme/blob/9a2da30342ace86978ddbd345eb69f5b4479b31c/sphinx_book_theme/topbar/launchbuttons.html#L29
and this logic is triggered here:
https://github.com/executablebooks/sphinx-book-theme/blob/e05def5b9a4fc777f702553a0bcaf7939440dbd3/sphinx_book_theme/launch.py#L118
Implementation details
A couple ideas:
thebe: true
context['use_thebe']
thebe-launch-button
?)Tasks to complete
The text was updated successfully, but these errors were encountered: