Non-hidden configuration of MyST-NB code cell parsing/rendering #784
Unanswered
kai-tub
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I love the configuration options of MyST-NB, especially the cell-level configuration options.
remove-cell
,remove-input
, andremove-output
options make it possible to produce high-quality content without polluting the page with code cells that aren't important to the reader.Options like
image
andfigure
give us authors even finer control over the output and make it easy to embed accessible images into our documentation.And there are many more things we could do.
In short, I love the level of control we have with MyST-NB over the output!
Thank you for that!
The main issue I have is that setting these configurations is (was) hard.
The metadata editor is hard to find in Jupyter Lab and isn't even accessible from within VSCode.
Plus, after editing the cell's metadata, the configuration is "hidden" from other authors, and it is quite confusing when two cells with the same content are rendered differently.
Especially when multiple people are working on different notebooks for a course, for example, then the hidden state can become quite confusing.
As a work-around, I have written a nice little wrapper:
https://docs.kai-tub.tech/common-nb-preprocessors/usage.html
with the wrapper, you can write magic comments that will be injected as metadata into your cell!
You won't have to touch the metadata editor at all, and it will be obvious how the cell will be rendered/parsed by MyST-NB.
This removes the hidden state of the cell-level configuration and makes it easier for new authors to configure the output.
I hope that others might find it useful as well.
Let me know if you have any thoughts! :)
Related: #360
Beta Was this translation helpful? Give feedback.
All reactions