-
Notifications
You must be signed in to change notification settings - Fork 49
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
directly inserting skipText into js #58
Conversation
5ec34d2
to
55a5a78
Compare
I'd also love to hear what @s-weigand thinks about this, as he was concerned about this behavior in different themes etc and I don't want to re-break this. My hope is that this is a more simple way to achieve the same thing. What do you think? (also note that this PR pins the minimal Sphinx theme needed to be 1.8, because that's when the event |
55a5a78
to
313c466
Compare
313c466
to
201a483
Compare
Just tested it with the problematic themes from #54 ( |
cool! OK then gonna merge this one after merging #57 |
3f8e66d
to
ce71ef0
Compare
ce71ef0
to
6ea12bc
Compare
this one now has a lot more functionality packed into it, I updated the top comment in case others have thoughts on it... |
OK I'm gonna merge this one and we'll see how it goes! |
hmmm, readthedocs seems to be doing weird things with generating the static files from the |
I guess you'll have to add |
My guess is that the template didn't get bundled. |
ohh that's a good point - I'll try updating that and see what happens |
This is an attempt at directly inserting the copybutton skip text into the javascript via templating, rather than manually inserting it on the python side.
Right now, it doesn't seem to work for reasons I can't figure out. The rendered javascript file doesn't have the correct config value inserted into it. I've opened up sphinx-doc/sphinx#7086 to try and debug.I think I figured out how to do this, the answer was in updating the
html_context
at the "config-ready" event rather than the "page-html-context" event.It also does the following:
This should now be ready to go...