.tsx, .ts, .jsx, .js, .mdx, or .md files directly in your MDX pages. This lets you use custom React components and shared Markdown snippets alongside the built-in MDX components.12345import { PricingTable } from '/components/pricing-table' # Pricing <PricingTable />
/)/ means the project root. Holocron probes the pages directory first, then the project root:1import { Chart } from '/components/chart'
pagesDir is ./pages, this looks for:./pages/components/chart.tsx (pages dir first)./components/chart.tsx (project root fallback)1import { Badge } from '../components/badge'
snippets/ or components/ directories. Any local file can be imported from any location..tsx, .ts, .jsx, .js, .mdx, .md. You do not need to include the extension in the import path.snippets/ directory for reusable content:12345my-docs/ ├── snippets/ │ └── install-command.tsx ├── getting-started.mdx └── docs.json
123456789// snippets/install-command.tsx export function InstallCommand() { return ( <div> <div>npm install @holocron.so/vite</div> <div>pnpm add @holocron.so/vite</div> </div> ) }
12345import { InstallCommand } from '/snippets/install-command' # Getting Started <InstallCommand />