Repository navigation
Description
Is your feature request related to a problem? Please describe.
I have multiple languages of a general documentation website and I'd like to be able to use intersphinx to link between them.
- GitHub: https://github.com/opendronemap/docs
- https://docs.opendronemap.org/
- https://docs.opendronemap.org/sw/
Additional context
I seem to be able to get info from language specific docs. For example from the English Python docs, running...
python -msphinx.ext.intersphinx https://docs.python.org/3/objects.inv
and getting...
std:doc
about About these documents : about.html
bugs Dealing with Bugs : bugs.html
And then from Spanish Python docs, running...
python -msphinx.ext.intersphinx https://docs.python.org/es/3/objects.inv
and getting...
std:doc
about Acerca de estos documentos : about.html
bugs Lidiar con errores : bugs.html
I set the following in my conf.py file:
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'pythones': ('https://docs.python.org/es/3/', None)
}
And I was expecting to be able to add the following to the .rst file for a page of my site:
- :python:doc:`about <about>`
- :pythones:doc:`about (es) <about>`
But I get the same link href for both:
<ul class="simple">
<li><p><a class="reference external" href="https://docs.python.org/3/about.html" title="(in Python v3.9)"><span class="xref std std-doc">about</span></a></p></li>
<li><p><a class="reference external" href="https://docs.python.org/3/about.html" title="(in Python v3.9)"><span class="xref std std-doc">about (es)</span></a></p></li>
</ul>
And I can't see a way to get the right URL path for the additional languages.
Activity
Calinou commentedon Oct 26, 2020
Maybe the research done in this PR can help you? godotengine/godot-docs#3279
tk0miya commentedon Oct 27, 2020
:python:doc:`about <about>`is not a valid notation. Please use:doc:`about <python:about>`. Then you can choose external project on referring expectedly.Fix #8342: Emit a warning if a unknown domain is given for directive …
danbjoseph commentedon Oct 27, 2020
@Calinou - Thank you for the link, I'll take a look.
@tk0miya - Oddly, when I've set my
conf.pyfile as written above and I try to use the notation you provide, it doesn't seem to be generating the links. So I think I must be doing something wrong in another place. When i runsphinx-build --versionit outputssphinx-build 3.2.1.In the
.rstfile:In the html output:
Merge pull request #8345 from sphinx-doc/8342_warning_for_unknown_domain
tk0miya commentedon Nov 3, 2020
Could you check your
intersphinx_mappingsetting, please? And please check the output of the sphinx build. Are there any warnings about:doc:reference?FYI: Here's result of my trial:
tk0miya commentedon Nov 12, 2020
I'm closing this now. Please feel free to reopen if you are still in the problem.
Thanks,
Master.patch (#1)