Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display JavaDocs on GitHub

I'm looking for a way to convert the javadocs from my open source project (generated in Eclipse) to GitHub MarkDown, or come up with some other simple solution to display my documentation on GitHub (shy of simply adding a docs directory). Is there a simple solution for this? Can I simply point the GitHub README.md to my docs directory? Is there something more elegant? I have been striking out on Google.

like image 637
Phil Avatar asked Mar 11 '13 20:03

Phil


People also ask

How do I publish a javadoc?

In the Goals field, place javadoc:javadoc —this will tell Maven to generate the Javadoc documentation. Now go to the “Post-build Action” and tick the “Publish Javadoc” checkbox. This project is a multimodule project, so a separate subdirectory is generated for each module (core, services, web and so forth).

How do I read a javadoc jar?

jamdoc.jar To view an HTML documentation file, open your web browser and specify the file name of the javadoc you want to view, taken from the classdocs directory. Any of the following files are good for getting started: classdocs/AllNames. html.


2 Answers

I don't think it's possible to make a usable Javadoc with MarkDown. The best solution is probably to commit the Javadoc you generated on the gh-pages branch (or in the docs/ directory depending on the settings of your project). It will be available at :

http://username.github.io/projectname

Here is an example from one of my projects:

http://ebourg.github.io/jsign/apidocs/

like image 139
Emmanuel Bourg Avatar answered Oct 12 '22 01:10

Emmanuel Bourg


Currently you can also host your Javadoc with Github Pages from not only a gh-pages branch, but directly from the /docs folder within your master branch. You can check the help section on this topic, here (also check attached image below).

enter image description here

Also, there's a project on Github that targets some conversion of Javadoc to Markdown (have not tried it yet, just leaving the reference).

like image 25
acoelhosantos Avatar answered Oct 12 '22 02:10

acoelhosantos