Skip to content

Latest commit

 

History

History
81 lines (59 loc) · 2.28 KB

File metadata and controls

81 lines (59 loc) · 2.28 KB

Development Guide

This guide covers how to set up and work on the Mintlify Astro Starter locally.

Prerequisites

Getting Started

  1. Clone the repository:
git clone https://github.com/mintlify/mintlify-astro-starter.git
cd mintlify-astro-starter
  1. Install dependencies:
npm install
  1. Create a .env file from the example:
cp .env.example .env
  1. Fill in your Mintlify credentials in .env:
PUBLIC_MINTLIFY_ASSISTANT_KEY=your_assistant_key
PUBLIC_MINTLIFY_SUBDOMAIN=your_subdomain
  1. Start the dev server:
npm run dev

The site will be available at http://localhost:4321.

Available Scripts

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

Project Structure

├── 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

Customizing Content

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.