39

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?

Don Kirkby
  • 53,582
  • 27
  • 205
  • 286
Dan Menes
  • 6,667
  • 1
  • 33
  • 35

1 Answers1

53

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

`Javascript API <js/index.html>`_
Dan Menes
  • 6,667
  • 1
  • 33
  • 35
  • 1
    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 Sep 20 '10 at 18:20
  • This reference will be useful: http://hyperpolyglot.org/lightweight-markup – Javier Mar 03 '18 at 21:17