# Installation

Install dependencies and start the local docs site.

Install dependencies:

```sh
npm install
```

Start the development server:

```sh
npm run dev
```

Build the site:

```sh
npm run build
```

Preview the production build:

```sh
npm run preview
```

## How Dahlia Is Wired

Dahlia automatically reads `theme.config.json` from the project root:

```ts title="astro.config.ts"
import { defineConfig } from 'astro/config';
import dahlia from '@prosefly/astro-theme-dahlia';

export default defineConfig({
  integrations: [dahlia()],
});
```

The docs collection is registered in `src/content.config.ts`:

```ts title="src/content.config.ts"
import { defineCollection } from 'astro:content';
import { docsLoader, docsSchema } from '@prosefly/astro-theme-dahlia/content';

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

export const collections = { docs };
```
