5

If I have an OTP layout like this:

foo/
  - apps/
    - bar1/
      - src/
    - bar2
      - src/

How can I generate edoc for both bar1 and bar2?

If I run:

rebar3 edoc

what I get is separate .html files in bar1/doc and bar2/doc, and none of the links between them work (i.e. export types are not linked correctly).

Thank you.

Andriy Drozdyuk
  • 58,435
  • 50
  • 171
  • 272

2 Answers2

4

Wrote a rebar3 plugin called medoc, that will make sure docs generated by edoc are correctly linked and table of contents is updated:

https://github.com/drozzy/medoc

Run as:

rebar3 medoc

As for the standard edoc, this does not seem to be a feature yet. An intermediary solution is to use this in your rebar config:

{edoc_opts, [{dir, "doc"}]}

But this will not update the table of contents correctly (i.e. you'll only see one app's toc).

Andriy Drozdyuk
  • 58,435
  • 50
  • 171
  • 272
3

This isn't supported by Rebar3 right now.

You can see in the source code that the edoc command just loops over each application with no state kept between them.

I'm not sure what it would take to connect them, but opening an issue on the Rebar3 repository to discuss it is probably the way to begin.

Nathaniel Waisbrot
  • 23,261
  • 7
  • 71
  • 99