Docco is a documentation generator by Jeremy Ashkenas that embraces the literate-programming style: it takes your source code and produces annotated HTML documentation that shows your comments side-by-side with your code. The idea is to read code like a book — commentary on one side, code on the other — which helps reviewers and learners understand intent and implementation simultaneously. It supports many languages (via configuration) and is intentionally quick and dirty, prioritizing lightweight output rather than heavy tooling. For teams that favour documentation that stays close to the codebase (rather than entirely separate docs), Docco offers a pragmatic route to keep documentation aligned with implementation. Because the output is browser-readable, it can live in your repository or website and be regenerated easily. It’s particularly useful for open-source projects, teaching code, or scaffolding codebases where reader orientation matters.
Features
- Generates HTML docs where comments and source code appear side-by-side
- Supports multiple layouts (parallel vs linear) configurable
- Customizable CSS and templates for branded output
- Language-support via configuration file (languages.json) so you can doc many file types
- CLI usage: docco [options] FILES to integrate into build pipelines
- Lightweight and easy to integrate into existing repos without heavy dependencies