Skip to content

Commit a4ab944

Browse files
committed
docs: add template for doc-driven mode
1 parent 6e1ff3b commit a4ab944

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/content/3.guide/1.writing/7.document-driven.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ It also offers `page`, `navigation`, `surround` and `globals` variables.
1111

1212
## Enable the mode
1313

14-
Add the `documentDriven` option in the `nuxt.config`:
14+
### Existing project
15+
16+
Add the [`documentDriven`](/api/configuration#documentdriven) option in the `nuxt.config`:
1517

1618
```ts
1719
import { defineNuxtConfig } from 'nuxt'
@@ -24,6 +26,14 @@ export default defineNuxtConfig({
2426
})
2527
```
2628

29+
### Fresh project
30+
31+
Start with a fresh project with the document driven mode enabled:
32+
33+
```bash
34+
npx nuxi init my-website -t doc-driven
35+
```
36+
2737
You can also use an object to configure the behavior of the mode, checkout the [configuration section](/api/configuration#documentdriven).
2838

2939
## Catch-all page

0 commit comments

Comments
 (0)