Plugin Documentation
How to publish documentation for your NaaP plugin.
Overview#
Plugin developers can publish documentation that appears alongside their plugin in the marketplace and within the NaaP docs site. Well-documented plugins get more installations and better reviews.
Documentation Structure#
Include a docs/ directory in your plugin:
| 1 | my-plugin/ |
| 2 | ├── plugin.json |
| 3 | ├── README.md # Main plugin documentation |
| 4 | ├── CHANGELOG.md # Version history |
| 5 | ├── docs/ |
| 6 | │ ├── getting-started.md # Quick setup guide |
| 7 | │ ├── configuration.md # Configuration options |
| 8 | │ ├── api.md # Plugin API reference |
| 9 | │ └── faq.md # Frequently asked questions |
| 10 | └── ... |
README Template#
Your README.md should include:
Markdown
| 1 | # My Plugin |
| 2 | |
| 3 | Brief description of what the plugin does. |
| 4 | |
| 5 | ## Features |
| 6 | |
| 7 | - Feature 1: Description |
| 8 | - Feature 2: Description |
| 9 | - Feature 3: Description |
| 10 | |
| 11 | ## Screenshots |
| 12 | |
| 13 |  |
| 14 | |
| 15 | ## Installation |
| 16 | |
| 17 | 1. Open the NaaP Marketplace |
| 18 | 2. Search for "My Plugin" |
| 19 | 3. Click Install |
| 20 | |
| 21 | ## Configuration |
| 22 | |
| 23 | | Setting | Type | Default | Description | |
| 24 | |---------|------|---------|-------------| |
| 25 | | pageSize | number | 20 | Items per page | |
| 26 | | refreshInterval | number | 30000 | Auto-refresh in ms | |
| 27 | |
| 28 | ## Usage |
| 29 | |
| 30 | ### Basic Usage |
| 31 | |
| 32 | Describe how to use the plugin's main features. |
| 33 | |
| 34 | ### Advanced Usage |
| 35 | |
| 36 | Describe power-user features and customization. |
| 37 | |
| 38 | ## API Reference |
| 39 | |
| 40 | If your plugin exposes events or APIs for other plugins: |
| 41 | |
| 42 | ### Events Emitted |
| 43 | |
| 44 | | Event | Payload | Description | |
| 45 | |-------|---------|-------------| |
| 46 | | `my-plugin:data-updated` | `{ id: string }` | Fired when data changes | |
| 47 | |
| 48 | ### Events Listened |
| 49 | |
| 50 | | Event | Description | |
| 51 | |-------|-------------| |
| 52 | | `team:change` | Refreshes data for new team | |
| 53 | |
| 54 | ## Changelog |
| 55 | |
| 56 | See [CHANGELOG.md](./CHANGELOG.md) |
| 57 | |
| 58 | ## License |
| 59 | |
| 60 | MIT |
CHANGELOG Template#
Follow Keep a Changelog format:
Markdown
| 1 | # Changelog |
| 2 | |
| 3 | ## [1.2.0] - 2025-12-01 |
| 4 | |
| 5 | ### Added |
| 6 | - Dark mode support |
| 7 | - Export to CSV feature |
| 8 | |
| 9 | ### Fixed |
| 10 | - Data refresh on team switch |
| 11 | - Mobile layout issues |
| 12 | |
| 13 | ## [1.1.0] - 2025-11-15 |
| 14 | |
| 15 | ### Added |
| 16 | - Real-time data updates |
| 17 | - Custom date range filter |
| 18 | |
| 19 | ## [1.0.0] - 2025-11-01 |
| 20 | |
| 21 | ### Added |
| 22 | - Initial release |
| 23 | - Dashboard with key metrics |
| 24 | - Data table with sorting and filtering |
Publishing Plugin Docs#
When you publish your plugin, documentation is automatically extracted:
Terminal
$naap-plugin publish
The publish process:
- Reads
README.mdfor the marketplace listing - Reads
CHANGELOG.mdfor version history - Reads
docs/directory for extended documentation - Uploads documentation to the registry
Documentation Best Practices#
- Start with why: Explain what problem your plugin solves
- Include screenshots: Visual documentation is more engaging
- Show code examples: Developers learn by example
- Document configuration: List all settings with defaults and descriptions
- Keep it updated: Update docs with each new version
- Add a FAQ: Address common questions proactively
- Link to related docs: Reference NaaP SDK docs for SDK-related topics
In-App Documentation#
You can also render documentation within your plugin's UI:
TypeScript
| 1 | import { useState, useEffect } from 'react'; |
| 2 | |
| 3 | function PluginDocs() { |
| 4 | const [content, setContent] = useState(''); |
| 5 | |
| 6 | useEffect(() => { |
| 7 | // Load your docs from the backend |
| 8 | fetch('/api/v1/my-plugin/docs/getting-started') |
| 9 | .then(res => res.text()) |
| 10 | .then(setContent); |
| 11 | }, []); |
| 12 | |
| 13 | return ( |
| 14 | <div className="prose dark:prose-invert max-w-none"> |
| 15 | <div dangerouslySetInnerHTML={{ __html: content }} /> |
| 16 | </div> |
| 17 | ); |
| 18 | } |