Writing Documentation
Learn how to write great documentation
2 min read
Writing Documentation
This guide covers everything you need to know about writing documentation.
File Structure
Documentation files live in the /docs directory:
text
docs/
├── getting-started/
│ ├── index.md
│ └── installation.md
├── guides/
│ └── writing-docs.md
└── api/
└── overview.mdFrontmatter
Every documentation file should include frontmatter:
text
---
title: Your Page Title
description: A brief description for SEO
order: 1
---Available Fields
title(required): Page titledescription(required): Page descriptionorder(optional): Sort order in navigationdraft(optional): Hide from productionauthor(optional): Content authordate(optional): Publication datetags(optional): Array of tags
Relative Links
You can link to other docs using relative paths:
text
[Installation Guide](../getting-started/installation)
[API Overview](../api/overview)The .md extension is optional and will be handled automatically.
Code Blocks
Use fenced code blocks with language specification:
text
```typescript
const greeting = 'Hello, World!'
console.log(greeting)
```Tables
Use GitHub Flavored Markdown tables:
| Feature | Supported |
|---|---|
| Markdown | ✅ |
| MDX | ✅ |
| Search | ✅ |
Task Lists
- Completed task
- Pending task
- Another pending task
Next Steps
Learn about configuring your documentation site.