Return full path URL (including
`make_document_url` had a behavior and it was returning invalid URL when the `page` argument was a docname (the case when used by the Embed API endpoint). This commit consider both cases for this attribute (filename page: index.html, or document name: config/v2) and decide if the `.html` extension needs to be added based on the builder --`documentation_type` (sphinx, sphinx_htmldir, mkdocs, etc) used for the project.
Where? When calling
The first case, would complicate all the resolution that I'm using in hoverxref extension. I'm using Sphinx internals to get the
In the second case, I'm not sure if that's what we want (considering that the endpoint is named
but I'm not sure that's the most correct pattern to follow, since asking the URL for a document should not include the extension on the request, but it should in the response.
What do you think?
This is an outcome of #5821 (comment) -- I think I'm mostly convinced we should move away from
I've reading different parts of the code where
I did a quick test passing the
This ends up rendering to
I'm thinking that's better to send both to the server and make it decide and use the one that it needs depending on the situation. What do you think?
@humitos of note, we also have this code in .org already, so should probably standardize it: