Quick setup guide for engineers working on Lua documentation.
- Node.js 16+ and npm
- Git for version control
- Code editor (VS Code recommended)
git clone <repository-url>
cd mintlify-docsnpm:
npm install -g mintlifyyarn:
yarn global add mintlifypnpm:
pnpm add -g mintlifyOr use package.json script:
npm run install-cliVerify installation:
mintlify --versionmintlify dev
# or
npm run devOpen http://localhost:3000 to view documentation.
- MDX - MDX language support
- Mintlify - Official Mintlify extension
- Prettier - Code formatting
- ESLint - Linting
- GitLens - Git integration
Create .vscode/settings.json:
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.associations": {
"*.mdx": "mdx"
},
"[mdx]": {
"editor.wordWrap": "on"
}
}mintlify-docs/
├── docs.json # ⚙️ Main config - navigation & theme
├── index.mdx # 🏠 Homepage
├── README.md # 📖 This guide
├── CONTRIBUTING.md # 🤝 Contribution guidelines
├── CHANGELOG.md # 📝 Version history
│
├── getting-started/ # 🚀 Onboarding (3 pages)
├── concepts/ # 💡 Core concepts (4 pages)
├── cli/ # ⌨️ CLI commands (5 pages)
├── api/ # 📚 API reference (9 pages)
├── template/ # 📦 Template guide (5 pages)
├── examples/ # 💼 Tool examples (7 pages)
└── chat-widget/ # 💬 Widget docs (12 pages)
# 1. Create the file
touch section-name/new-page.mdx
# 2. Add frontmatter
cat > section-name/new-page.mdx << 'EOF'
---
title: "Page Title"
description: "Page description"
---
## Content here
EOF
# 3. Add to docs.json navigation
# Edit docs.json and add "section-name/new-page" to appropriate group
# 4. Test locally
mint dev# 1. Find the file
# Example: api/data.mdx
# 2. Edit content
code api/data.mdx
# 3. Preview changes
# Save file, dev server auto-reloads
# 4. Commit
git add api/data.mdx
git commit -m "docs: improve Data API examples"
git push# 1. Edit docs.json
code docs.json
# 2. Update navigation.tabs array
# 3. Test locally
mint dev
# 4. Verify all pages load
# 5. Commit
git add docs.json
git commit -m "docs: reorganize navigation"# Colors in docs.json
"colors": {
"primary": "#8B5CF6",
"light": "#A78BFA",
"dark": "#7C3AED"
}
# Logos in /logo/ directory
# Replace light.png and dark.png
# Favicon at root
# Replace favicon.pngBefore committing:
-
mint devruns without errors - All new pages load correctly
- No broken links (
mint broken-links) - Code examples are correct
- Mobile view works (resize browser)
- Search finds new content
- Images load properly
- No console errors (F12)
Port 3000 in use:
lsof -ti:3000 | xargs kill -9
mint devInvalid docs.json:
# Validate JSON syntax
cat docs.json | python -m json.tool
# or
jq . docs.jsonPage not appearing:
- Check file path in docs.json matches actual file
- Verify frontmatter is valid YAML
- Check for MDX syntax errors
Styling broken:
- Check Mintlify component syntax
- Verify all tags are closed
- Check for unclosed code blocks
# Development
mint dev # Start dev server
mint dev --port 3001 # Use different port
# Building
mint build # Build for production
# Utilities
mint broken-links # Check for broken links
mint --version # Check Mintlify version
mint --help # Show all commands# Features
git checkout -b feat/add-webhooks-docs
# Fixes
git checkout -b fix/broken-link-in-api
# Documentation
git checkout -b docs/improve-examples
# Refactoring
git checkout -b refactor/reorganize-cli-sectionFollow conventional commits:
# Adding content
git commit -m "feat: add webhook integration guide"
# Fixing errors
git commit -m "fix: correct API endpoint in example"
# Updating docs
git commit -m "docs: improve quick start clarity"
# Styling changes
git commit -m "style: format code examples"
# Breaking changes
git commit -m "feat!: restructure navigation"- Use kebab-case:
my-new-page.mdx✅ - Be descriptive:
voice-chat.mdx✅ - Avoid abbreviations:
configuration.mdxnotconfig.mdx✅ - Match content: filename reflects page content ✅
- Lowercase:
chat-widget/✅ - Descriptive:
getting-started/✅ - Hyphenated:
api-reference/✅
- Descriptive names:
cli-workflow-diagram.png✅ - Lowercase:
logo.png✅ - Include dimensions:
hero-1200x600.png(optional) ✅
# Optimize images before adding
# Use tools like:
# - TinyPNG (https://tinypng.com)
# - ImageOptim (Mac)
# - Squoosh (https://squoosh.app)
# Keep images under:
# - Screenshots: < 200KB
# - Logos: < 50KB
# - Icons: < 10KB- Keep pages under 100KB when possible
- Lazy load images when appropriate
- Minimize large code blocks
- Use collapsible sections (Accordions) for long content
- ❌ API keys or tokens
- ❌ Private agent IDs (use placeholders)
- ❌ User data or emails
- ❌ Internal URLs or endpoints
- ❌
.envfiles
- ✅ Example/placeholder IDs
- ✅ Public documentation
- ✅ Open source code examples
- ✅ Generic configurations
- ✅
.env.examplefiles
- Quickstart: https://mintlify.com/docs/quickstart
- Components: https://mintlify.com/docs/components
- Configuration: https://mintlify.com/docs/settings
- Deployment: https://mintlify.com/docs/deployment
- README.md - Main developer guide (this file)
- CONTRIBUTING.md - Contribution guidelines
- CHANGELOG.md - Version history
- DEVELOPER_NOTES.md - Internal notes and decisions
- Mintlify Style Guide: https://mintlify.com/docs/content/text
- MDX Documentation: https://mdxjs.com/
- Conventional Commits: https://www.conventionalcommits.org/
- Check DEVELOPER_NOTES.md for architecture decisions
- Check CONTRIBUTING.md for contribution guidelines
- Ask in team chat/Slack
- Mintlify Docs: https://mintlify.com/docs
- Mintlify Community: https://mintlify.com/community
- GitHub Issues: For bugs and questions
New team member checklist:
- Clone repository
- Install Mintlify CLI
- Run
mint devsuccessfully - Read README.md (this file)
- Read CONTRIBUTING.md
- Browse documentation locally
- Understand navigation structure
- Know where each type of content goes
- Can add a new page
- Can update existing page
- Understand commit conventions
- Know how to test changes
- Total Pages: 46 MDX files
- Navigation Tabs: 2 (CLI, Chat Widget)
- Groups: 9 content groups
- Code Examples: 200+ working examples
- Supported Languages: TypeScript, JavaScript, HTML, CSS, Bash, YAML
- Supported Frameworks: React, Vue, Angular, Next.js, Svelte, Nuxt
# Development
npm run dev # Start dev server
mint dev # Same as above
# Testing
mint broken-links # Check for broken links
# Installation
npm run install-cli # Install Mintlify globally
# Git workflow
git checkout -b feat/my-feature
# Make changes
git add .
git commit -m "feat: describe changes"
git push origin feat/my-feature
# Create pull requestQuestions? See CONTRIBUTING.md or ask the team!