|
| 1 | +[](https://github.com/dart-lang/labs/actions/workflows/jot.yml) |
| 2 | + |
| 3 | +An experimental documentation generator for Dart. |
| 4 | + |
| 5 | +## What's this? |
| 6 | + |
| 7 | +An experimental documentation generator for Dart; the main design features are: |
| 8 | + |
| 9 | +- fast generation |
| 10 | +- output one page per library and per class (instead of a page per symbol) |
| 11 | +- output rendered in a SPA web app |
| 12 | +- few configuration options for the CLI tool |
| 13 | +- designed to be used as a library for sophisticated use cases (documenting the |
| 14 | + Dart SDK, the Flutter SDK, ...) |
| 15 | + |
| 16 | +## Status: experimental |
| 17 | + |
| 18 | +**NOTE**: This package is currently experimental and published under the |
| 19 | +[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to |
| 20 | +solicit feedback. |
| 21 | + |
| 22 | +For packages in the labs.dart.dev publisher we generally plan to either graduate |
| 23 | +the package into a supported publisher (dart.dev, tools.dart.dev) after a period |
| 24 | +of feedback and iteration, or discontinue the package. These packages have a |
| 25 | +much higher expected rate of API and breaking changes. |
| 26 | + |
| 27 | +Your feedback is valuable and will help us evolve this package. For general |
| 28 | +feedback, suggestions, and comments, please file an issue in the |
| 29 | +[bug tracker](https://github.com/dart-lang/labs/issues). |
| 30 | + |
| 31 | +## Command-line usage |
| 32 | + |
| 33 | +``` |
| 34 | +Generate API documentation for Dart projects. |
| 35 | +
|
| 36 | +usage: dart bin/jot.dart <options> [<directory>] |
| 37 | +
|
| 38 | +-h, --help Print this command help. |
| 39 | +-o, --output Configure the output directory. |
| 40 | + (defaults to "doc/api") |
| 41 | + --[no-]markdown Include LLM-friendly markdown summaries of the API. |
| 42 | + (defaults to on) |
| 43 | + --serve=<port> Serve live docs from the documented package. |
| 44 | + This serves on localhost and is useful for previewing docs while working on them. |
| 45 | +``` |
| 46 | + |
| 47 | +## Markdown API summaries |
| 48 | + |
| 49 | +Markdown summaries of the package's libraries are emitted into doc/api. |
| 50 | +These are designed for use by agents and LLMs. They are a token dense |
| 51 | +representation of the API; for example, for most symbols, the first markdown |
| 52 | +sentence of the symbol is used (instead of the full dartdoc text). In a future |
| 53 | +version, code examples in the documentation will be preserved as these are |
| 54 | +valuable to LLMs. |
| 55 | + |
| 56 | +## Infima and Docusaurus |
| 57 | + |
| 58 | +The CSS page layout for this API generator are sourced from the |
| 59 | +[Docusaurus](https://docusaurus.io/) project. |
0 commit comments