Contributing to Documentation
Guidelines for contributing to Nudg3 API documentation
Contributing to Documentation
This guide explains how to contribute to the Nudg3 API documentation. Whether you're fixing a typo or adding new content, we appreciate your help!
Getting Started
Prerequisites
- Node.js 18+
- pnpm 8+
- Git
Local Development
- Clone the repository:
- Install dependencies:
- Start the docs development server:
- Open http://localhost:3004 in your browser
Content Structure
Documentation is organized in apps/docs/content/docs/:
Writing Content
File Format
All documentation is written in MDX (Markdown + JSX):
Frontmatter
Every MDX file requires frontmatter:
| Field | Required | Description |
|---|---|---|
title | Yes | Page title (shown in sidebar and browser tab) |
description | Yes | Brief description for SEO and search |
full | No | Set to true for full-width layout |
Navigation
Update content/docs/meta.json when adding new pages:
MDX Components
Callouts
Use callouts to highlight important information:
Renders as:
Informational note
Warning message
Cards
Use cards for navigation:
Code Blocks
Always specify the language:
Content Guidelines
Writing Style
- Be concise: Get to the point quickly
- Use active voice: "Send a request" not "A request should be sent"
- Include examples: Show, don't just tell
- Use proper headings: H1 for title, H2 for sections, H3 for subsections
AI-Friendly Content
Our documentation is designed for AI agents (RAG systems). Follow these patterns:
- Clear structure: Use consistent heading hierarchy
- Semantic HTML: Tables for data, lists for steps
- Code examples: Include working code snippets
- No complex components: Keep MDX simple
- Related links: Add cross-references at bottom of pages
API Documentation Pattern
When documenting API endpoints, use this template:
Pull Request Process
- Create a branch:
-
Make your changes in
apps/docs/content/docs/ -
Test locally:
- Build to check for errors:
- Commit your changes:
- Push and create PR:
Common Tasks
Adding a New Page
- Create MDX file in appropriate directory
- Add frontmatter with title and description
- Update
meta.jsonnavigation - Add links from related pages
Updating API Documentation
- Check backend for latest endpoint details
- Update relevant MDX file
- Verify code examples work
- Update OpenAPI spec if needed
Fixing Typos
- Find the MDX file in
content/docs/ - Make the correction
- Commit with message:
docs: fix typo in [page-name]
Need Help?
- Documentation issues: Open a GitHub issue
- Technical questions: Ask in the development Slack channel
- Fumadocs help: See Fumadocs documentation