Skip to content
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

Embed API Javascript example not working #2667

Closed
humitos opened this issue Feb 24, 2017 · 6 comments · Fixed by #5819
Closed

Embed API Javascript example not working #2667

humitos opened this issue Feb 24, 2017 · 6 comments · Fixed by #5819
Labels
Accepted Accepted issue on our roadmap Needed: documentation Documentation is required
Milestone

Comments

@humitos
Copy link
Member

humitos commented Feb 24, 2017

At http://docs.readthedocs.io/en/latest/embed.html#javascript there is a real example that doesn't work because it's not able to load the css and js file because it's using http://localhost:5555/ urls.

What are the correct ones?

@humitos humitos added the Support Support question label Feb 24, 2017
@humitos
Copy link
Member Author

humitos commented Feb 24, 2017

On the NOTE it says that they are already loaded but I'm getting a 404 on http://docs.readthedocs.io/static/css/public.css

@agjohnson
Copy link
Contributor

The embed stuff is half baked. We should consolidate this until we have something that is production ready.

@stsewd
Copy link
Member

stsewd commented Jan 11, 2018

I think the urls are:

  • {host}/media/css/readthedocs-doc-embed.css
  • {host}/media/javascript/readthedocs-doc-embed.js

And on rtd:

  • https://media.readthedocs.org/javascript/readthedocs-doc-embed.js
  • https://media.readthedocs.org/css/readthedocs-doc-embed.css

But doesn't look like this is implemented.

@agjohnson agjohnson added Needed: documentation Documentation is required and removed Support Support question labels Sep 19, 2018
@agjohnson agjohnson added this to the Documentation milestone Sep 19, 2018
@stsewd
Copy link
Member

stsewd commented Nov 27, 2018

I guess we can remove that documentation till we have something working, the embed endpoint was removed #4768.

Actually, it should just be updated, but we need to modify the ext:

The embebed logic comes from https://github.com/rtfd/readthedocs-ext/blob/af0f42aa1227551b0849605d9935d102f130ce8b/readthedocsext/embed/views.py#L35

and it's mounted on the v1 endpoint https://github.com/rtfd/readthedocs.org/blob/b170de972be8dfe99318ab7533a72c8bf6ec32a1/readthedocs/urls.py#L117-L121

But the sphinx-ext is fetching from the v2 endpoint (that got removed bs it wasn't working).
https://github.com/rtfd/readthedocs-sphinx-ext/blob/5b3afcd9f28264b0e13ca7bb11ebe624c1674fdd/readthedocs_ext/embed.py#L10

The v1 endpoint works https://readthedocs.org/api/v1/embed/?project=requests&doc=index&section=User%20Guide

@stsewd
Copy link
Member

stsewd commented Nov 27, 2018

Should we update the sphinx-ext? or should we mount the embed api on the v2 endpoint? or remove the feature?

@stsewd stsewd added the Needed: design decision A core team decision is required label Nov 27, 2018
@ericholscher
Copy link
Member

Yea, we should remove this from the docs, and just expose the REST API & JS framework for now.

@humitos humitos added Accepted Accepted issue on our roadmap and removed Needed: design decision A core team decision is required labels Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Needed: documentation Documentation is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants