-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate docs with ExDoc #268
Generate docs with ExDoc #268
Conversation
Codecov Report
@@ Coverage Diff @@
## main #268 +/- ##
==========================================
- Coverage 36.58% 36.55% -0.04%
==========================================
Files 45 45
Lines 3187 3187
==========================================
- Hits 1166 1165 -1
- Misses 2021 2022 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Awesome! Looking great. I noticed edoc markup was replaced with html like when making a list. I thought it would be markdown based on examples I'd seen from @wojtekmach. Maybe that is a separate thing and I'm conflating ways of generating ex_doc from Erlang? If so maybe it'd be simple to update this PR to use the chunks based approach like https://github.com/wojtekmach/dotfiles/blob/625d2daba1392e82dab9681d23da09efb2a3fd0f/bin/docs_chunk.exs |
@tsloughter yeah, sorry for causing confusion, i had a bunch of different proof of concepts for various aspects of docs generation that I was spamming you all about. This PR follows https://github.com/elixir-lang/ex_doc#using-exdoc-with-erlang-projects and it is definitely the way to go. |
Co-authored-by: Tristan Sloughter <t@crashfast.com>
For the HTML markup, I'm following here: https://github.com/beam-telemetry/telemetry/blob/f559faee2f01f0757ac055e501f48abc8e1ba1bd/src/telemetry.erl#L122 as the current markdown based doesn't work as expected when generating with ExDoc for Erlang docs. Just curious, @wojtekmach is that the intended behaviour (some markdown is not supported) when using ExDoc to genearte Erlang docs? Is it right to say that the markup currently supported is as documented here: https://erlang.org/doc/apps/edoc/chapter.html#wiki-notation? |
Yes, it is correct. To be specific, ExDoc doesn’t care what you use to write your docs as long as these two things are true:
The ExDoc Erlang instructions show how to set your project to extract docs into chunk using Edoc. And then how to trigger hope this helps, please lmk otherwise. |
Ahh okay, that's very clear. Thanks for the input 👍🏻 |
@wojtekmach Just curious, if we were to support Markdown syntax in If that's the case, is there any ongoing work related to that? Let me know if you prefer to have this discussion on a different channel. @tsloughter Also, I just checked the generated docs again and found out that some modules is not generated by Are those modules intended to be private and this behaviour is expected? |
@kw7oe sorry, I had missed your question. If a module is private it will be marked as But, hehe, I was going to merge this and any updates can come in future PRs? Did you ever hear back from @wojtekmach |
@tsloughter Yeap, Yeap all good to merge and any new updates can come in the future PRs. I haven't heard back from wojtekmach but it's fine since it seems like he's on vacation. |
This PR add ability to generate documentation for
opentelemetry
andopentelemetry_exporter
with ExDoc. This work is mostly refer to the following resources:So far, there are a few caveats:
$version
used indocs.sh
is hardcoded and used by bothopentelemetry
andopentelemetry_exporter
.Since I'm quite new to Erlang and Rebar, so there are probably places where I did things incorrectly or can be further improve.
To test out locally:
./docs.sh
.apps/opentelemetry/doc/index.html
apps/opentelemetry_exporter/doc/index.html
Screenshot
OpenTelemetry
OpenTelemetry Exporter