From a4ab94442f36f87565265cd10741a5fdaba1102a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Thu, 30 Jun 2022 17:49:48 +0200 Subject: [PATCH] docs: add template for doc-driven mode --- docs/content/3.guide/1.writing/7.document-driven.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/content/3.guide/1.writing/7.document-driven.md b/docs/content/3.guide/1.writing/7.document-driven.md index 81d279fff..fb3f18510 100644 --- a/docs/content/3.guide/1.writing/7.document-driven.md +++ b/docs/content/3.guide/1.writing/7.document-driven.md @@ -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' @@ -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