ocaml.org icon indicating copy to clipboard operation
ocaml.org copied to clipboard

Improve the "Platform documentation" page on how to write docs

Open panglesd opened this issue 1 year ago • 3 comments

The platform tool guide on how to write documentation is minimal.

I think it would benefit from some examples, explanation on what is a docstring and how it is attached to an item, some explanation of the (basic) syntax, etc. Another content could be "what kind of content to put in docstrings", but this is a bit more personal.

I can give it a shot if there is no volunteer!

panglesd avatar May 03 '24 08:05 panglesd

I would also think it would be worth adding a link to it directly from the "Overview" page of "Learning" (maybe only once it is improved), but I don't see which section it could replace...

panglesd avatar May 03 '24 09:05 panglesd

I can give it a shot if there is no volunteer!

Please do! Yes, this guide needs to be updated.

cuihtlauac avatar May 06 '24 06:05 cuihtlauac

I think a good first step would be to just add an example docstring in the section on Defining Global Functions. I searched "docstring" on every page in the Language and Guides and never found anything other than the "Generating documentation with odoc", which is good for library authors but unhelpful for language learners.

On second thought, this would be better suited for A Tour of Ocaml.

NoahTheDuke avatar Jul 26 '24 15:07 NoahTheDuke