Skip to content

Custom JS / analytics #728

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

Closed
drewcrawford opened this issue Mar 9, 2014 · 2 comments
Closed

Custom JS / analytics #728

drewcrawford opened this issue Mar 9, 2014 · 2 comments

Comments

@drewcrawford
Copy link

I want to inject some custom JS into my documentation so that I can track analytics, while using the RTD theme. It's not immediately clear what the best way to do this is. I'm opening this issue in the hope that the right way could get documented.

sphinx faq recommends overriding layout.html. However there's an open issue that RTD ignores this.

This guy did it with page.html but he's using the basic theme.

There was talk about adding analytics support awhile ago, and I guess such a thing did get implemented in a different form, and that is cool, but I still want to use another analytics service.

@oz123
Copy link

oz123 commented Jul 12, 2014

Phew, I looked quite a while for this. the labibi project mentiond above is quite cool. That said,
the trivial way, I am guessing that most people would start like this, would be to override layout.html, then find out it does not work.

It would be very nice to be able to inject some js code to header and so on without the need to create new theme.
I just need to add some d3 graphs in the documentation, that is all.

@ericholscher
Copy link
Member

This is a dupe of the #152 -- basically we need to support layout.html or find a workaround. Still trying to figure this out, all these years later :x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants