Javadocs interoperability

I’m working on a technical documentation project right now in which I’d like to be able to generate Javadocs for some Java libraries and then link to those pages using relative URLs (i.e. link to them as if they were in the content directory). Thus far, I’ve tried placing the generated Javadocs in the public directory but that doesn’t seem to work. Do any of you have suggestions for this?

First, I would just dump the JavaDoc in the /static folder.

JavaDoc, as I understand it, creates links relative to the API root, so it is “…/…/java/util/Date.html” etc. where the … are “docs/api”.

They do so to make the docs browseable from the file system, I guess.

This is actually possible in Hugo, too – see the RelativeURLs config setting. But that is beside the point here, I think.

Given a baseURL of http://base/ a link to “/docs/api/java/util/Date.html” – is your baseURL have a sub-path, it may be smart to use relURL, so

relURL "/docs/api/java/util/Date.html"