docs-guide/canonical/collation-data/Mintlify/mintlify-repo-best-practices.md.
Source Order
Use Mintlify information in this order:- Official Mintlify docs for component APIs and platform features.
- Repo runtime and workflow surfaces:
docs.json,.mintignore,style.css,tools/lpd,tools/dev/*, and.githooks/*. - The internal canonical Mintlify guide for repo-safe authoring and agent instructions.
Official Docs
- Mintlify Docs
- Mintlify Components
- Reusable Snippets
- docs.json Schema and Navigation
- Mintlify llms.txt
Repo Rules
docs.jsonis the routing and navigation source of truth..mintignorecontrols repo-kept files that must not publish.style.cssis the governed theme and CSS variable surface.lpd devis the governed local preview entrypoint. Do not default to ad hoc Mintlify commands.- Author in
v2/**unless the task explicitly targets legacy or internal surfaces.
Authoring
- Do not import
Reactor React hooks. - Do not import Mintlify platform globals such as
Card,Tabs,Accordion, orSteps. - Use root-absolute imports for shared resources under
snippets/**. - Relative imports are acceptable for tightly colocated route-local files.
- Include file extensions in imports.
- Keep data orchestration in the parent MDX when working with MDX-facing JSX.
- Use arrow-function exports in JSX helpers and avoid file-scope constants that exported JSX depends on.
Styling
- Use CSS custom properties from
style.css. - Deprecated repo theme helper patterns must not be introduced.
- Do not use inline styles in MDX pages.
- In JSX, inline style objects are acceptable only for component-local or runtime-dynamic values that still use CSS variables.
Preview
- First-time setup:
bash lpd setup --yes - Health check:
lpd doctor - Scoped preview:
lpd dev --scoped --scope-listlpd dev --scoped --scope-tab <Tab>lpd dev --scoped --scope-prefix <path>
3333 through lpd dev and must not bind direct Mint preview to port 3000.
Validate
lpd test --stagednode operations/tests/unit/mdx.test.js --stagednode operations/tests/unit/style-guide.test.js --stagednode operations/scripts/validators/governance/compliance/check-agent-docs-freshness.js --json