views:

16

answers:

1

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?

+1  A: 

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

`Javascript API <js/index.html>`_
Dan Menes
Unless you are still looking for a better answer, you should accept your own answer. This way people that find your question in a search can see that it has a correct answer.
Geoff Reedy
Forgot that I hadn't accepted yet.
Dan Menes