On Mon, Oct 22, 2012 at 11:25 AM, James Brady <
ja...@trigger.io> wrote:
> Hi all, we're documenting a project which includes some Java APIs, and
> we'd really like to include the pre-generated Javadocs with the Sphinx docs.
>
> Of course, we could put the HTML in the static directory, but I'm not sure
> how to link to it without using absolute links.
>
> Is there some way to include, and link to, HTML in Sphinx output?
>
> Thanks!
>
James,
If what you want is to include your generated Javadocs as HTML and link to
them, what I would probably do (and have done in the past) is to write a
small sphinx extension for a custom role to create your links. It's pretty
easy (probably easier than you think) though not terribly well documented
anywhere that I know of.
If you'd like to see some example code though, there's a "traclinks"
extension in the sphinx-contrib repo:
https://bitbucket.org/birkenfeld/sphinx-contrib/src/d9788a8b567d/traclinks?at=default
and the PyDoctor project also has a similar one:
http://bazaar.launchpad.net/~mwhudson/pydoctor/dev/view/head:/apilinks_sphinxext.py
which does almost exactly what you are talking about, except it links to
PyDoctor-generated HTML, rather than Jaavdoc-generated HTML.
You can probably find other examples floating around the net.
(fair warning, I wrote both of these, so use at your own risk ;) )
[If I'm totally misunderstanding what you want, and you really want to
include excerpts of HTML _within_ a RestructuredText page, then just use
the "raw" directive.]
--
Kevin Horn