This repository is humanlup docs — a personal documentation site built with Mintlify. It uses MDX (Markdown + JSX) for content pages, docs.json for all site configuration, and OpenAPI for auto-generated API reference documentation.
Key Technologies:
- Mintlify CLI (Node.js v19+)
- MDX (Markdown with React components)
- OpenAPI specification for API documentation
- Git for version control
/
├── docs.json # Main configuration file (navigation, theme, branding)
├── index.mdx # Homepage/landing page
├── quickstart.mdx # Getting started guide
├── development.mdx # Dev environment setup
├── README.md # Repository readme
│
├── essentials/ # Core reference pages
│ ├── markdown.mdx # Markdown & MDX syntax
│ ├── code.mdx # Code blocks & highlighting
│ ├── images.mdx # Images, embeds, dark mode
│ ├── settings.mdx # docs.json config reference
│ ├── navigation.mdx # Sidebar & tab setup
│ └── reusable-snippets.mdx # Snippet/component reuse
│
├── advanced/ # Deeper topics
│ ├── components.mdx # MDX components & agent tools
│ ├── seo-metadata.mdx # SEO & metadata setup
│ └── versioning.mdx # Multi-version docs
│
├── api-reference/ # API documentation
│ ├── introduction.mdx # API docs overview
│ ├── authentication.mdx # Bearer token auth
│ ├── openapi.json # OpenAPI 3.1 specification
│ └── endpoint/ # Endpoint pages
│ ├── get.mdx
│ ├── create.mdx
│ ├── delete.mdx
│ └── webhook.mdx
│
├── snippets/ # Reusable content snippets
│ └── snippet-intro.mdx
│
├── images/ # Image assets
│ ├── hero-light.png
│ ├── hero-dark.png
│ └── checks-passed.png
│
├── logo/ # Brand logos
│ ├── light.svg
│ └── dark.svg
│
└── favicon.svg # Site favicon
The central configuration file that controls:
- Navigation structure - Defines all pages, tabs, and groupings
- Theme and branding - Colors, logos, and visual styling
- Global settings - Links, anchors, footer socials
- Site metadata - Name, schema, favicon
Important: Any new page MUST be added to docs.json navigation to be visible in the docs site.
All content files use .mdx extension (Markdown + JSX):
- Support standard Markdown syntax
- Can embed React components (Cards, Accordions, Notes, Tips, etc.)
- Include frontmatter with
title,description, and optionalicon - Use root-relative links for internal navigation (e.g.,
/essentials/markdown)
api-reference/openapi.json- Contains API specification- Endpoint MDX files can reference OpenAPI operations using
openapifrontmatter field - Example:
openapi: 'GET /plants'automatically generates API documentation
-
Prerequisites:
- Node.js version 19 or higher
- npm or yarn package manager
-
Install Mintlify CLI:
npm i -g mintlify # OR yarn global add mintlify -
Start Development Server:
mintlify dev
- Runs on
http://localhost:3000by default - Use
--portflag for custom port:mintlify dev --port 3333
- Runs on
- Edit MDX files directly in your editor
- Changes hot-reload in the browser
- Preview reflects production appearance
- Use
mintlify broken-linksto validate internal links
npm i -g mintlify@latest
# OR
yarn global upgrade mintlify- Changes deploy automatically via Mintlify GitHub App
- Push to default branch triggers production deployment
- Verify deployment success by checking commit status on dashboard
- Manual deployment available through Mintlify dashboard
-
Always create MDX files, not MD files
- Use
.mdxextension for all content
- Use
-
Include proper frontmatter:
--- title: 'Page Title' description: 'Brief description for SEO and previews' icon: 'icon-name' # Optional: from icon library ---
-
Add to docs.json navigation:
- Locate appropriate tab and group
- Add file path (without extension) to
pagesarray - Example:
"essentials/new-page"foressentials/new-page.mdx
-
Use root-relative links:
[Link to page](/essentials/markdown) # CORRECT [Link to page](../markdown) # AVOID - slower performance
Mintlify provides rich components for enhanced documentation:
Callout Components:
<Note>- General information<Tip>- Helpful hints<Info>- Important information<Warning>- Cautionary notes
Layout Components:
<Card>- Interactive card with icon, title, and link<CardGroup cols={2}>- Grid of cards<Accordion>- Collapsible sections<AccordionGroup>- Multiple accordions<Frame>- Image wrapper with styling<CodeGroup>- Tabbed code blocks
Content Components:
<Latex>- Mathematical formulas- Images support light/dark mode variants
Example:
<CardGroup cols={2}>
<Card title="Guide" icon="book" href="/guide">
Detailed guide content
</Card>
<Card title="API" icon="code" href="/api">
API documentation
</Card>
</CardGroup>Use language-specific syntax highlighting:
\`\`\`javascript
const example = "code here";
\`\`\`
\`\`\`python
def example():
return "code here"
\`\`\`For multiple language examples, use <CodeGroup>:
<CodeGroup>
\`\`\`bash npm
npm install package
\`\`\`
\`\`\`bash yarn
yarn add package
\`\`\`
</CodeGroup>- Store in
/images/directory - Use relative paths from root:
/images/filename.png - Support light/dark mode variants:
<img className="block dark:hidden" src="/images/hero-light.png" /> <img className="hidden dark:block" src="/images/hero-dark.png" />
- Store reusable content in
/snippets/directory - Include using MDX import syntax
- Follow DRY principles to avoid content duplication
-
Edit openapi.json for API specifications
- Define endpoints, schemas, authentication
- Use standard OpenAPI 3.0+ format
-
Create endpoint MDX files that reference OpenAPI operations:
--- title: 'Get Plants' openapi: 'GET /plants' ---
-
Authentication is specified in openapi.json:
"security": [{ "bearerAuth": [] }]
Alternatively, use Mintlify's MDX components for API docs without OpenAPI specs.
The navigation object controls the entire site structure:
{
"navigation": {
"tabs": [
{
"tab": "Tab Name",
"groups": [
{
"group": "Group Name",
"pages": ["path/to/page", "another/page"]
}
]
}
],
"global": {
"anchors": [/* external links */]
}
}
}Key Rules:
- Page paths exclude
.mdxextension - Paths are root-relative from repository base
- Order in array determines display order
- Nested groups create hierarchical navigation
{
"theme": "mint",
"colors": {
"primary": "#16A34A",
"light": "#07C983",
"dark": "#15803D"
}
}{
"name": "Site Name",
"logo": {
"light": "/logo/light.svg",
"dark": "/logo/dark.svg"
},
"favicon": "/favicon.svg"
}- Feature branches: Use descriptive names with
claude/prefix - Current branch:
claude/claude-md-mhylzprgrvak9wo1-01BaybaRw8xCznaDuSq2HXZA - Always develop on designated feature branches
- Never push directly to main/master
Follow conventional commit format:
docs: Add new authentication guidefix: Correct broken link in quickstartfeat: Add API webhook documentationrefactor: Reorganize essentials sectionstyle: Update code formatting in examples
- Use:
git push -u origin <branch-name> - Branch names must start with
claude/and match session ID - Retry on network errors (exponential backoff: 2s, 4s, 8s, 16s)
- Create MDX file in appropriate directory
- Add frontmatter with title, description, icon
- Write content using MDX syntax and components
- Update
docs.jsonto include page in navigation - Test locally with
mintlify dev - Validate links with
mintlify broken-links - Commit and push changes
- Read the existing MDX file
- Make targeted edits using Edit tool
- Preserve frontmatter and formatting
- Test changes locally
- Commit with descriptive message
- Update
api-reference/openapi.jsonwith endpoint spec - Create MDX file in
api-reference/endpoint/ - Add frontmatter with
openapifield referencing operation - Add to
docs.jsonnavigation under API Reference group - Test and commit
- Edit
docs.jsonnavigation structure - Move/reorder pages in appropriate groups
- Update any affected internal links in MDX files
- Validate with
mintlify broken-links - Test navigation in local preview
- Edit
docs.jsonfor colors, logos, or metadata - Update logo files in
/logo/if needed - Update favicon if needed
- Test in both light and dark modes
- Commit changes
- First-person, casual voice - This is a personal site. Write like you're explaining something to yourself in six months
- Clear, concise writing - Documentation should be scannable
- Use appropriate components - Cards for navigation, Accordions for detailed steps
- Code examples - Always include practical examples
- Consistent formatting - Follow existing patterns in the codebase
- SEO-friendly - Meaningful titles and descriptions in frontmatter
- Prefer editing over creating - Update existing files when possible
- Consistent naming - Use lowercase with hyphens:
api-authentication.mdx - Logical organization - Group related content in appropriate directories
- Image optimization - Use appropriate formats (SVG for logos, PNG for screenshots)
- Logical hierarchy - Group related pages together
- Descriptive names - Clear group and page titles
- Reasonable depth - Avoid overly nested navigation
- Complete coverage - All MDX files should be in navigation
- Always test locally - Run
mintlify devbefore pushing - Check all links - Use
mintlify broken-linkscommand - Visual review - Verify formatting, components render correctly
- Dark mode - Test both light and dark themes if using images
- Descriptive commits - Explain what changed and why
- Atomic commits - One logical change per commit
- Clean history - Avoid force pushes and history rewrites
- Branch hygiene - Work on designated feature branches only
-
Port already in use:
- Mintlify auto-selects next available port
- Or specify custom port:
mintlify dev --port 3333
-
Sharp module error on darwin-arm64:
- Remove mintlify:
npm remove -g mintlify - Upgrade to Node.js v19+
- Reinstall:
npm install -g mintlify
- Remove mintlify:
-
Unknown errors:
- Delete
~/.mintlifyfolder - Run
mintlify devagain
- Delete
-
Page shows 404:
- Verify
docs.jsonincludes page in navigation - Check file path matches navigation entry
- Ensure
mintlify devruns from directory withdocs.json
- Verify
-
Links not optimized:
- Use root-relative links:
/path/to/page - Avoid relative links:
../page
- Use root-relative links:
- Mintlify Documentation: https://mintlify.com/docs
- CLI Changelog: https://www.npmjs.com/package/mintlify?activeTab=versions
- Community: https://mintlify.com/community
- Dashboard: https://dashboard.mintlify.com
- Configuration: Uses
docs.json(modern format) - Legacy files:
mint.jsonis deprecated, use upgrade command if found - CLI version: Keep updated with
npm i -g mintlify@latest
Before any major task:
- Read existing files to understand patterns
- Check
docs.jsonfor navigation structure - Verify local development setup if testing required
When creating content:
- Use MDX, not MD
- Include complete frontmatter
- Update docs.json navigation
- Use Mintlify components for rich formatting
- Test locally before committing
When editing:
- Read file first
- Preserve existing formatting and style
- Maintain frontmatter structure
- Update related navigation if needed
When working with API docs:
- Understand OpenAPI spec structure
- Keep openapi.json synchronized with endpoint MDX files
- Follow authentication patterns in spec
Git operations:
- Always work on feature branches starting with
claude/ - Use descriptive commit messages
- Push with
-uflag for new branches - Implement retry logic for network operations
Last Updated: 2026-02-24 Repository: localwolfpackai/docs