-
Notifications
You must be signed in to change notification settings - Fork 92
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
Copy button for snippets #7
Comments
I'm not sure this is simple since it isn't easy to ensure that an appropriate class is added to snippets. I think something would need to be added to code-block, https://www.sphinx-doc.org/es/master/usage/restructuredtext/directives.html#directive-code-block like the option to add a user class. Perhaps rst-class would be enough? Although this would require changing code and couldn't just be added using a conf option. |
FYI: there is https://github.com/choldgraf/sphinx-copybutton I don't know if it works with this theme, though. |
Would be good to add it. I was thinking it would be configurable. If sphinx-copybutton works, then I suppose could just suggest that rather than rolling a hone-grown solution. |
This is actively being worked on in spatialaudio/nbsphinx#349 Please leave your feedback there! |
I've just released Here's how Jupyter notebooks look with the sphinx-material theme and with sphinx-copybutton enabled: https://nbsphinx.readthedocs.io/en/material-theme/code-cells.html. |
Thanks! I confirm It works like a charm: https://dynamic-fba.readthedocs.io/en/latest/example1.html |
Looks great! |
Just set it up, looks really nice! |
* Show underline when hovering over links * Change foreground color to have stronger contrast as per #7 * Remove extraneous padding and nicely align left side with right side of footer * Add link to LICENSE in GitHub repo Signed-off-by: Daniel Lim Wee Soong <weesoong.lim@gmail.com>
Hey. Not sure this is in scope or not. Maybe it would be nice to add a copy button to each snippet, like what is done here. Maybe be using clipboard.js?
The text was updated successfully, but these errors were encountered: