Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert relative link in reStructuredText

I am documenting a library that has a Python component and a JavaScript component. The overall user documentation, and the Python API documentation are in reStructuredText, processed with Sphinx. The JavaScript API is in jsdoc and is processed with jsdoc-toolkit. The principal output format will be HTML. I am new to reST, Sphinx and jsdoc.

I have set up a build system so all the generated html pages are dumped into a single directory tree. I now need to insert into the main page (generated from reST) a link to the generated Javascript documentation. This needs to be a relative link, since the docs may be located in different places on different installations. reST will automatically parse a full URL, but I can't figure out how to make it insert a relative link. Constructs like :ref: and :doc: don't seem to help, because they expect the target to be reST.

Any ideas?

like image 693
Dan Menes Avatar asked Sep 02 '10 19:09

Dan Menes


People also ask

How do I play a .RST file?

How to open an RST file. Because RST files are plain text files, you can open and edit them in any text editor, including: GitHub Atom (cross-platform)


1 Answers

Figured it out. The following inserts a relative reference to the document js/index.html:

`Javascript API <js/index.html>`_ 
like image 160
Dan Menes Avatar answered Sep 19 '22 03:09

Dan Menes