Skip to content

Commit

Permalink
docs: add template for doc-driven mode
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Jun 30, 2022
1 parent 6e1ff3b commit a4ab944
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/content/3.guide/1.writing/7.document-driven.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ It also offers `page`, `navigation`, `surround` and `globals` variables.

## Enable the mode

Add the `documentDriven` option in the `nuxt.config`:
### Existing project

Add the [`documentDriven`](/api/configuration#documentdriven) option in the `nuxt.config`:

```ts
import { defineNuxtConfig } from 'nuxt'
Expand All @@ -24,6 +26,14 @@ export default defineNuxtConfig({
})
```

### Fresh project

Start with a fresh project with the document driven mode enabled:

```bash
npx nuxi init my-website -t doc-driven
```

You can also use an object to configure the behavior of the mode, checkout the [configuration section](/api/configuration#documentdriven).

## Catch-all page
Expand Down

0 comments on commit a4ab944

Please sign in to comment.