mozilla / fathom

A framework for extracting meaning from web pages
http://mozilla.github.io/fathom/
Mozilla Public License 2.0
1.97k stars 76 forks source link

Choose a documentation extractor #54

Closed erikrose closed 7 years ago

erikrose commented 7 years ago

I'd like to be able to keep API docs in one place—in the source code—but still pull them out into HTML docs that slap more prose and context around them. I would like to avoid the common antipattern where the docs consist of an alphabetical list of routines, leaving the poor newcomer to wander linearly through them, trying to piece together an overview. Add contenders below.

Sphinxy things

Sphinx integration is nice because Sphinx is amazing, offering freeform docs in restructured text, indexing and glossary building, a good markup language with arbitrary nesting of constructs parsed in an unambiguous way, output of numerous formats, a decade plus of maturity, and the fact that I know it like the back of my hand.

Pure JSDoc

The nice thing about this is that some JS tooling can consume it, like editors and Google's Closure Compiler (which uses type annotations to hint to the optimizer).

erikrose commented 7 years ago

I wrote something: https://github.com/erikrose/sphinx-js. It gives us everything we want, doesn't require Ruby or Java, and lets us use JSDoc notation within the JS code, which is probably considered normal for that language. The results: http://mozilla.github.io/fathom/.