This guide covers how to set up and work on the Mintlify Astro Starter locally.
- Clone the repository:
git clone https://github.com/mintlify/mintlify-astro-starter.git
cd mintlify-astro-starter- Install dependencies:
npm install- Create a
.envfile from the example:
cp .env.example .env- Fill in your Mintlify credentials in
.env:
PUBLIC_MINTLIFY_ASSISTANT_KEY=your_assistant_key
PUBLIC_MINTLIFY_SUBDOMAIN=your_subdomain
- Start the dev server:
npm run devThe site will be available at http://localhost:4321.
| Command | Description |
|---|---|
npm run dev |
Start the development server |
npm run build |
Build the site for production |
npm run preview |
Preview the production build locally |
npm run format |
Format code with Prettier |
npm run lint |
Run ESLint |
npm run lint:fix |
Run ESLint with auto-fix |
├── docs/ # Documentation content (MDX pages, images, config)
│ ├── docs.json # Navigation and site configuration
│ ├── index.mdx # Homepage
│ └── ...
├── src/
│ ├── components/ # React and Astro components
│ ├── hooks/ # Custom React hooks
│ ├── icons/ # SVG icon components
│ ├── layouts/ # Astro layout templates
│ ├── pages/ # Astro page routes
│ ├── styles/ # Global CSS and Tailwind styles
│ └── utils/ # Utility functions
├── astro.config.mjs # Astro configuration
├── tsconfig.json # TypeScript configuration
└── package.json
Documentation pages live in the docs/ directory as MDX files. Site navigation and metadata are configured in docs/docs.json.
See the Mintlify documentation for details on available components and configuration options.