Replies: 6 comments 6 replies
-
To clarify: a Sphinx extension is basicslly a Python script that combines and adds CSS, JavaScript and HTML into a fancy package. So if this functionality can be achieved, it must be first developed, and then put into a package. I think having the possibility might open doors (in minds) to also use it if needed. I am no expert on Thebe nor JupyterHub, so I think this is more suited for someone who does. |
Beta Was this translation helpful? Give feedback.
-
The part about customizing the button is more or less trivial (though I've never done it - i should do what Dennis outlined for my own good :)). The part about doing it per page in the toc is really interesting to me. Tom and I have always talked about a "ToC on steroids"---basically the ability to specify anything you want with YAML key:values and then use the teachbooks package carry out the process as specified by the extra YAML. So in addition to the link to a jupyter hub, it could include:
In the teachbooks package it would be something that is added to the CLI tool as a pre-processing step, which is not really well defined itself, but is essentially some stuff that happens before |
Beta Was this translation helpful? Give feedback.
-
With respect to the last part: extensions can do stuff before the actual build process. We do that with the TU Delft theme too, as we have to set the logo in the _config.yml At any stage of the entire build process it is possible to execute Python code, which means you are basically unlimited in what you want to do. |
Beta Was this translation helpful? Give feedback.
-
As an introduction, I found this https://www.linuxtv.org/downloads/sphinx-1.2.3/extdev/tutorial.html useful. |
Beta Was this translation helpful? Give feedback.
-
this is now on pypi for when @RolfHut or @BSchilperoort start moving beyond the jupyterhub functionality included in jupyterbook by default, seems like it would be useful for going from book-level to page-level links??? |
Beta Was this translation helpful? Give feedback.
-
for a book I'm building, we have different launch buttons (thebe and jupyter hub). Different pages in the book can be run using thebe, all can be run using the jupyterhub (but thus not needed for those that work with thebe).
For our project it would be good if we can specify per jupyter notebook which launchbuttons should be made available. This would, if I understand all underlying technology, require a specific extension (something like "custom-launch-buttons"), or it would require fiddling with javascript and css (brrrr....)
It took me a while to explain the problem to our joint human intelligence (https://chatgpt.com/share/675abf14-2714-800d-8c25-e38969cafb69), but that is where I got the .js and .css option.
Are there any other projects that would benefit from this?
Rolf
Beta Was this translation helpful? Give feedback.
All reactions