-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π πΌοΈ Add topic directive #1132
Conversation
9a218f2
to
1bc4109
Compare
In sphinx this looks like: I think we should handle the header properly. I think that this should eventually be As another bug, we are dropping other aside titles. |
d7e1e55
to
eaf2d9a
Compare
This PR avoids the new node type by assuming that the first child is the title. I don't hate that, but I recognise that we long-term want #1139 |
Looking through this, I think we just want to merge with https://jupyterbook.org/en/stable/content/layout.html#sidebars-within-content |
Going to move ahead with this for now to queue up a release - we can always come back and make improvements. |
This PR adds the RST
topic
directive, which behaves like an aside, with a stylised heading.Here's an example RST:
This generates the following HTML in Sphinx/docutils:
Our MDAST with this PR is
I welcome any suggested changes here.
One extraneous change is the addition
class
andlabel
(identifier
) attributes to theaside
AST node type. I think it's our goal to add this to all MyST nodes, right? Perhaps that would be done on the baseNode
type, rather than per-node like we currently do inmyst-spec
?