Reputation: 3312
How do I generate OTP-like documentation for multiple applications?
I have developed an application library following the OTP structure, and I'm using rebar to compile the code.
An example of my directory structure is shown below:
lib/
apps/
application_1/
include/
src/
application_2/
include/
src/
...
rebar.config
rebar
My rebar.config
file looks like the one below:
{sub_dirs, ["apps/application_1",
"apps/application_2",
...]}.
When I run rebar doc
, the documentation is generated and stored in the doc
folder inside each application directory, but I want to generate a documentation that understands the library folder as one single unit. In other words, I want to create an index page automatically, just like the Erlang documentation.
I tried understanding erl_docgen, but to no avail. Is there a way to do this?
Upvotes: 3
Views: 963
Reputation: 61121
medoc (for multiple-edoc), is a rebar3 plugin I wrote that will put all the docs into the same top level doc
directory.
Upvotes: 1
Reputation: 30995
In the case of OTP, the documentation you find at http://erlang.org/doc seems to be generated using a bunch of HTML templates, scripts and Makefiles. See:
https://github.com/erlang/otp/tree/maint/system/doc/top
You might want to use that as an "inspiration" for your own documentation top pages.
I'm not sure if rebar can create a documentation index for all the Erlang applications contained in an Erlang release, but I doubt it.
Upvotes: 2