Generate docs with odoc
See original GitHub issueDune provides builtin support for documentation generation with odoc
. Generating Reason syntax with odoc
is already possible. This means that we can generate documentation for any Reason+esy project!
There’re some things that need to be fixed first, in particular:
- Unattached docstring parsing currently seems to be broken in the Reason parser. (I’ll open a separate issue for this later.)
- Currently odoc generates OCaml syntax by default. We need to teach dune how to generate Reason syntax for docs (https://github.com/ocaml/odoc/issues/129).
- This could be done by setting an environment variable
- Or by generating Reason syntax for
rei
files
- The generated docs are currently placed in the
_build/default/_doc/_html
directory inside esy’s environment. I think asking users to go to that directory to open docs is not ideal.
I already started working on this and expect to have something functional soon.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:7 (7 by maintainers)
Top Results From Across the Web
odoc (odoc) - GitHub Pages
odoc is a documentation generator for OCaml. It reads doc comments from your source files and your .mld files, and outputs HTML, LaTeX...
Read more >Generating Documentation - Dune documentation
Documentation in Dune is done courtesy of the odoc tool. Therefore, to generate documentation in Dune, you will need to install this tool....
Read more >ocaml/odoc: Documentation compiler for OCaml and Reason
odoc is a documentation generator for OCaml. It reads doc comments , delimited with (** ... *) , and outputs HTML, LaTeX and...
Read more >Odoc 1.4.0 — new OCaml documentation generator
We are pleased to announce release 1.4.0 of odoc, the new, Dune-friendly documentation generator for OCaml and ReasonML.
Read more >dart doc
The dart doc command (previously called dartdoc ) creates API reference documentation from Dart source code. You can add descriptions to the generated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for looking into this! I’ve tried odoc with some of my esy-based projects and I really liked how it looks!
In the next esy version it would be possible to reference esy envs from a command line like this:
I think we can add a script
esy opendoc
which does that.I think this is done now. Or at least current master is in a good enough shape IMO.