Quick Start
This guide will walk you through generating your first documentation with doc-kit. You’ll learn the basic workflow and see real examples of different output formats.Basic Usage
The simplest way to generate documentation:- Reads all markdown files matching
docs/api/*.md - Generates HTML documentation using the legacy format
- Outputs files to the
outdirectory
Generate Legacy HTML Documentation
To create a 1:1 match with the traditional Node.js documentation format:Generate Modern Web Documentation
Create redesigned documentation pages with built-in search:Generate web output with search
Use the
web and orama-db generators:The
orama-db generator creates a search index. You must include it if you want search functionality.Generate Man Pages
Create Unix manual pages for command-line reference:Available Generator Targets
You can use the-t or --target flag to specify one or more output formats:
| Generator | Description | Use Case |
|---|---|---|
legacy-html | Traditional Node.js HTML format | Legacy compatibility |
legacy-html-all | Single-file HTML with all APIs | Offline browsing |
legacy-json | Structured JSON format | Tooling integration |
legacy-json-all | Single JSON file with all APIs | Data processing |
web | Modern redesigned web pages | Modern documentation sites |
orama-db | Search index database | Enable search in web format |
man-page | Unix manual pages | Command-line reference |
json-simple | Simplified JSON structure | Custom integrations |
llms-txt | LLM-optimized text | AI/LLM consumption |
api-links | API link verification | Quality assurance |
addon-verify | Addon verification | Validate C++ addons |
Common CLI Options
Here are the most frequently used options:Input and Output
Version and References
Performance
Example with all options
Real-World Example: Node.js Repository
If you have a clone of the Node.js repository, you can generate its documentation:Using Configuration Files
For complex setups, create a configuration file:Configuration files can be JavaScript (
.mjs, .js with "type": "module") or JSON (.json) format.Next Steps
Now that you’ve generated your first documentation:Configuration
Learn about advanced configuration options
Generators
Explore all available generators in detail
CLI Commands
Master all CLI commands and options
Custom Generators
Build your own custom generators