-
-
Notifications
You must be signed in to change notification settings - Fork 42
Adding "hide prompt and output" feature for docs codeblocks #13
Conversation
@bsipocz - would it be possible to show an example build for this so that other people can decide whether to go ahead with this? Also, could you add the relevant license to the |
Arrow button in the upper right corner of the code blocks e.g.: The license is a good question, I'll try to figure out where it is coming from originally (I copied it from Python's sphinxext). |
@bsipocz - thanks! Just for info, you don't need to put the URL in double ticks. Just put it normally and it will be clickable. |
@bsipocz - very cool! |
@astrofrog - It looks like it's indeed coming from Python (but I'm not 100% sure). So should I copy the PSF license over, or how does that work? |
Well, this is the closest I've found: https://answers.launchpad.net/ubuntu/trusty/+source/python-numpy/+copyright |
@bsipocz - that seems to be the right one. The license should go in astropy-helpers, in |
@bsipocz - yes, I would copy the license for |
@astrofrog - Added |
@bsipocz - thanks! The next step is to email astropy-dev to suggest this change, point to this pull request, and point to the example page, and ask if anyone has any objections to including this. You can always point out (to be explicit) that this is very handy for copy/pasting examples. |
👍 |
@@ -6,6 +6,10 @@ | |||
{# Add the google webfonts needed for the logo #} | |||
{% block extrahead %} | |||
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,600' rel='stylesheet' type='text/css'> | |||
{% if not embedded %}<script type="text/javascript" src="{{ | |||
pathto('_static/copybutton.js', | |||
1) }}"></script>{% endif %} |
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.
I think this is one of those cases where strict adherence to a line wrap boundary makes no sense :)
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.
😄
See astropy-dev mailing list thread here. |
Looks good to me |
No objections have been raised, and this is a cool feature, so I'm going to go ahead and merge! (it will be great to have this for 0.4) |
Adding "hide prompt and output" feature for docs codeblocks
…prompt_and_output Adding "hide prompt and output" feature for docs codeblocks
…prompt_and_output Adding "hide prompt and output" feature for docs codeblocks
No description provided.