I included sphinx.ext.intersphinxin my project and added the following configuration:
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'pyserial': ('https://pythonhosted.org/pyserial/', None),
}
I have the following in mine index.rst:
This project depends on the :ref:`pyserial <pyserial:???>` library.
I want the link to point to the http://pythonhosted.org/pyserial/root url in intersphinx_mapping, but I don't know what ???should be.
If I do :ref:`pyserial`or :ref:`pyserial <pyserial>`, I getWARNING: undefined label: pyserial (if the link has no caption the label must precede a section header)
If I do :ref:`pyserial <>`, I getWARNING: undefined label: (if the link has no caption the label must precede a section header)
I can replace it :ref:with , but I would really like to link to the page through intersphinx to avoid broken links along the line.`pyserial <http://pythonhosted.org/pyserial/>`_
I am using sphinx 1.6.3 on Python 3.6.2 in Anaconda. I did not hang too much in the library I was trying to contact. I suspect the answer will not be tied to the library.
, pyserial docs . , :py:class:`serial.Serial` https://pythonhosted.org/pyserial/pyserial_api.html#serial.Serial.