# Installation

> Add Mines to a new or existing Astro project.

<Steps>

### Install the package

<CodeGroup sync="pm">
```bash [pnpm]
pnpm add @deltaq.dev/mines
```
```bash [npm]
npm install @deltaq.dev/mines
```
```bash [yarn]
yarn add @deltaq.dev/mines
```
</CodeGroup>

### Register the integration

```js [astro.config.mjs]
import { defineConfig } from 'astro/config';
import mines from '@deltaq.dev/mines';

export default defineConfig({
  integrations: [mines({ title: 'My Docs' })],
});
```

### Define the content collection

```ts [src/content.config.ts]
import { defineCollection } from 'astro:content';
import { docsLoader, docsSchema } from '@deltaq.dev/mines/loader';

export const collections = {
  docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
};
```

### Write your first page

```mdx [src/content/docs/1.getting-started/1.introduction.mdx]
---
title: Introduction
description: Welcome to my docs.
---

Hello world.
```

</Steps>

<Callout type="tip">
  Mines adds `@astrojs/mdx` for you. If you already registered it, your instance is reused.
</Callout>
