-
Notifications
You must be signed in to change notification settings - Fork 21
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 more configuration options to TryExamples directive and add documentation #116
Conversation
- This seems to be no longer relevant after switch to notebooklite
I just added conversion of sphinx format links I'll work on getting the SciPy docs published at https://steppi.github.io/scipy built against this branch. I ran out of circle ci free credits, so it's not as simple as a push. I'll figure something out. Things look good locally though. |
Thanks a lot! Will try to give it a review by the end of the week |
Docs from this branch are up at https://steppi.github.io/scipy you can find a specific example here https://steppi.github.io/scipy/reference/generated/scipy.integrate.tplquad.html#scipy.integrate.tplquad |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Released! |
Awesome! Thanks @martinRenou! Hoping to have this shipped in SciPy’s docs soon. |
This PR updates adds more flexible configuration for the
TryExamples
directive, fixes some small bugs, and adds documentation.New options include
:button_text:
for changing the text of the button for switching from rendered examples to a notebook.:button_hover_css:
for specifying the css properties to give to the button when the user hovers over it,:button_position_vertical:
one oftop
orbottom
specifying vertical placement of the button with respect to the examples block covered by the directive.:button_position_horizontal:
one ofleft
,right
, orcenter
, analogous to above.:min_height:
, the minimum height to give the iframe container for the notebook. By default, the height is the same as the height of the rendered examples block the container replaces. For very small examples blocks, this yields an unusably small notebook.:min_height:
helps with this edge-case.I noticed that the
TryExamples
directive had stopped working following the update to Jupyterlite 0.2 due to changes in paths; this has been fixed.I've also fixed a bug that causes math blocks within markdown cells to be skipped if there is no additional content after them.
I've added documentation for the directive and how it can be configured. I note that one needs to make sure that the version of the package in your Jupyterlite kernel needs to match the version of the package you are documenting, but did not elaborate on this, because I haven't solved this problem yet. I've been testing this on the latest SciPy release. Eventually it would be nice to be able to use the directive in dev docs, and when that get's figured out, I'll add more information to the documentation.