MyST-NB
MyST-NB copied to clipboard
Add a prolog option in the config
Context
I'm trying to convert from nbsphinx to myst-nb, but am impeded by a few features that we have come to rely on for nbsphinx.
One important one is the prolog. We use this to inject code into the notebooks that adds a colab link (see here for the tutorial and here for the prolog)
Proposal
Add a prolog option to the configuration to allow code injection like nbsphinx.
Tasks and updates
No response
Hi @adamgayoso have you considered looking at https://github.com/executablebooks/sphinx-book-theme, which we designed specifically to have these kind of features at the theme level, i.e. as shown in the documentation here https://myst-nb.readthedocs.io/en/latest/render/format_code_cells.html
this is certainly the approach that I would encourage. (and was playing before about how this could be added to furo 😉 https://furo-topbar.readthedocs.io/en/latest/#top)
Its not out of the question, thinking about a prolog feature, but I don't really like the way it is in nbsphinx, it just adds a lot of bloat to top of every page
have you considered looking at https://github.com/executablebooks/sphinx-book-theme, which we designed specifically to have these kind of features at the theme leve
I would like to switch to this theme, but am waiting for dark mode to be added!