diff --git a/docs/.gitignore b/docs/.gitignore
index cc46f5e6e8..b4a500fb84 100644
--- a/docs/.gitignore
+++ b/docs/.gitignore
@@ -1,2 +1,2 @@
schema
-*.nuxt.config.md
+**/*.configuration/nuxt.config.md
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000000..007b17fc7a
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,4 @@
+# Nuxt 3 Docs
+
+- Website: https://v3.nuxtjs.org/
+- Setup and Contribution Guide: https://v3.nuxtjs.org/community/contribution#documentation-guide
diff --git a/docs/assets/nuxt.css b/docs/assets/nuxt.css
index 1cb8f98642..26cbe0958d 100644
--- a/docs/assets/nuxt.css
+++ b/docs/assets/nuxt.css
@@ -24,3 +24,7 @@ button:focus-visible, div:focus-visible, a:focus-visible {
border-radius: 2px;
box-shadow: 0 0 0 2px #00DC82;
}
+
+h1 > code, h2 > code, h3 > code, h4 > code, h5 > code, h6 > code {
+ font-size: inherit !important;
+}
diff --git a/docs/components/templates/AutoGenerated.vue b/docs/components/templates/AutoGenerated.vue
new file mode 100644
index 0000000000..4eb0c5de15
--- /dev/null
+++ b/docs/components/templates/AutoGenerated.vue
@@ -0,0 +1,8 @@
+
+
+ This section is auto generated from source-code.
+
+
+
+
diff --git a/docs/components/templates/NeedContribution.vue b/docs/components/templates/NeedContribution.vue
new file mode 100644
index 0000000000..2468444655
--- /dev/null
+++ b/docs/components/templates/NeedContribution.vue
@@ -0,0 +1,11 @@
+
+
+ Documentation for this section is not yet complete. You can
+
+ contribute to the documentation.
+
+
+
+
+
diff --git a/docs/components/templates/ReadMore.vue b/docs/components/templates/ReadMore.vue
new file mode 100644
index 0000000000..666d5a16a0
--- /dev/null
+++ b/docs/components/templates/ReadMore.vue
@@ -0,0 +1,30 @@
+
+
+ Read more in .
+
+
+
+
diff --git a/docs/content/1.getting-started/1.introduction.md b/docs/content/1.getting-started/1.introduction.md
deleted file mode 100644
index ab2e1d8070..0000000000
--- a/docs/content/1.getting-started/1.introduction.md
+++ /dev/null
@@ -1,95 +0,0 @@
-# Introduction
-
-Getting started with Nuxt 3 is straightforward.
-
-::alert{type=warning icon=π§}
-Nuxt 3 is currently in beta, keep in mind that **it is not yet production-ready**.
-Thank you in advance for your understanding π Check out the [roadmap](/community/roadmap) for more info.
-::
-
-## What is Nuxt?
-
-If this is the first time you're learning about Nuxt or you want to get more familiar with Nuxt 3, we recommend you begin by reading the [Concepts section](/concepts).
-
-## Prerequisites
-
-Before getting started, please make sure you have installed the recommended setup.
-
-* **Node.js*** (latest LTS version) π [[Download](https://nodejs.org/en/download/)]
-* **Visual Studio Code** π [[Download](https://code.visualstudio.com/)]
-* **Volar Extension** π [[Download](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)]
- * Either enable [**Take Over Mode**](https://github.com/johnsoncodehk/volar/discussions/471) (recommended)
- * ... or add **TypeScript Vue Plugin (Volar)** π [[Download](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin)]
-
-* If you already have Node.js installed, check with `node --version` that you are using `v14` or `v16`.
-
-::alert{type=info}
-
-If you have enabled **Take Over Mode** or installed the **TypeScript Vue Plugin (Volar)** you can disable generating the shim for `*.vue` files:
-
-```js
-export default defineNuxtConfig({
- typescript: {
- shim: false
- }
-})
-```
-
-::
-
-## Nuxt 3 or Bridge?
-
-Next, decide whether to start from scratch or upgrade an existing Nuxt 2 project.
-
-### Starting a fresh Nuxt project
-
-::list{type=info}
-
-* Enjoy using Vue 3
-* All the new composables are available
-* New templating system and conventions are enabled
-::
-
-::alert{icon=π}
-Checkout the [Installation section](/getting-started/installation).
-::
-
-### Migrating a Nuxt 2 project
-
-If you have an existing Nuxt 2 project, we **strongly recommend** you begin by using Nuxt Bridge. This way you can try most new features while keeping breaking changes to a minimum.
-
-::list{type=info}
-
-* It's risk-free! You can always remove the module from your config
-* Makes your project (almost) ready for Nuxt 3
-* Enjoy new DX improvements without major rewrites for Vue 3
-* Use Nitro engine for platform-agnostic and optimized deployments
-* Help us stabilize Nuxt 3 and discover flaws
-* Nuxt Bridge is more stable than Nuxt 3 at the moment
-::
-
-::alert{icon=π}
-Checkout the [Bridge installation section](/getting-started/bridge).
-::
-
-### βComparison
-
-In the table below, there is a quick comparison between 3 versions of Nuxt:
-
-Feature / Version | Nuxt 2 | Nuxt Bridge | Nuxt 3
--------------------------|-----------------|------------------|---------
-Vue | 2 | 2 | 3
-Stability | π Stable | π Semi-stable | π¬ Unstable
-Performance | π Fast | βοΈ Faster | π Fastest
-Nitro Engine | β | β
| β
-ESM support | π Partial | π Better | β
-TypeScript | βοΈ Opt-in | π§ Partial | β
-Composition API | β | π§ Partial | β
-Options API | β
| β
| β
-Components Auto Import | β
| β
| β
-`
```
-## Isomorphic fetch
+## Isomorphic `fetch` and `$fetch`
When we call `fetch` in the browser, user headers like `cookie` will be directly sent to the API. But during server-side-rendering, since the `fetch` request takes place 'internally' within the server, it doesn't include the user's browser cookies, nor does it pass on cookies from the fetch response.
+::ReadMore{link="/api/utils/$fetch"}
+::
+
### Example: Bypass API headers to client
-We can use [`useRequestHeaders`](/docs/usage/ssr) to access and proxy cookies to the API from server-side.
+We can use [`useRequestHeaders`](/api/composables/use-request-headers) to access and proxy cookies to the API from server-side.
The example below adds the request headers to an isomorphic `fetch` call to ensure that the API endpoint has access to the same `cookie` header originally sent by the user.
diff --git a/docs/content/3.docs/1.usage/2.state.md b/docs/content/2.guide/2.features/6.state-management.md
similarity index 81%
rename from docs/content/3.docs/1.usage/2.state.md
rename to docs/content/2.guide/2.features/6.state-management.md
index e71cf5ba81..33f5e4b8fd 100644
--- a/docs/content/3.docs/1.usage/2.state.md
+++ b/docs/content/2.guide/2.features/6.state-management.md
@@ -1,18 +1,11 @@
-# State
+# State Management
Nuxt provides `useState` composable to create a reactive and SSR-friendly shared state across components.
`useState` is an SSR-friendly [`ref`](https://vuejs.org/api/reactivity-core.html#ref) replacement. Its value will be preserved after server-side rendering (during client-side hydration) and shared across all components using a unique key.
-## Signature
-
-```ts
-useState(key: string, init?: () => T): Ref
-```
-
-* **key**: A unique key ensuring that data fetching can be properly de-duplicated across requests
-* **init**: A function that provides initial value for the state when it's not initiated
-* **T**: (typescript only) Specify the type of state
+::ReadMore{link="/api/composables/use-state"}
+::
::alert{icon=π}
`useState` only works during `setup` or [`Lifecycle Hooks`](https://vuejs.org/api/composition-api-lifecycle.html#composition-api-lifecycle-hooks).
@@ -54,6 +47,9 @@ const counter = useState('counter', () => Math.round(Math.random() * 1000))
:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/framework/tree/main/examples/use-state?terminal=dev" blank}
+::ReadMore{link="/api/composables/use-state"}
+::
+
### Advanced
In this example, we use a composable that detects the user's default locale from the HTTP request headers and keeps it in a `locale` state.
@@ -62,7 +58,7 @@ In this example, we use a composable that detects the user's default locale from
## Shared state
-By using [auto-imported composables](/docs/directory-structure/composables) we can define global type-safe states and import them across the app.
+By using [auto-imported composables](/guide/directory-structure/composables) we can define global type-safe states and import them across the app.
```ts [composables/states.ts]
export const useCounter = () => useState('counter', () => 0)
diff --git a/docs/content/3.docs/1.usage/8.error-handling.md b/docs/content/2.guide/2.features/7.error-handling.md
similarity index 93%
rename from docs/content/3.docs/1.usage/8.error-handling.md
rename to docs/content/2.guide/2.features/7.error-handling.md
index 81a328ca9f..a5d2d575e0 100644
--- a/docs/content/3.docs/1.usage/8.error-handling.md
+++ b/docs/content/2.guide/2.features/7.error-handling.md
@@ -1,4 +1,4 @@
-# Error handling
+# Error Handling
## Handling errors
@@ -71,24 +71,33 @@ const handleError = () => clearError({ redirect: '/' })
## Error helper methods
-### useError
+### `useError`
* `function useError (): Ref`
This function will return the global Nuxt error that is being handled.
-### throwError
+::ReadMore{link="/api/composables/use-error"}
+::
+
+### `throwError`
* `function throwError (err: string | Error): Error`
You can call this function at any point on client-side, or (on server side) directly within middleware, plugins or `setup()` functions. It will trigger a full-screen error page (as above) which you can clear with `clearError`.
-### clearError
+::ReadMore{link="/api/composables/throw-error"}
+::
+
+### `clearError`
* `function clearError (redirect?: string): Promise`
This function will clear the currently handled Nuxt error. It also takes an optional path to redirect to (for example, if you want to navigate to a 'safe' page).
+::ReadMore{link="/api/composables/clear-error"}
+::
+
## Rendering errors within your app
Nuxt also provides a `` component that allows you to handle client-side errors within your app, without replacing your entire site with an error page.
@@ -105,9 +114,9 @@ If you navigate to another route, the error will be cleared automatically.
```vue [pages/index.vue]
-
+
-
+
You can display the error locally here.
diff --git a/docs/content/2.guide/2.features/8.plugins.md b/docs/content/2.guide/2.features/8.plugins.md
new file mode 100644
index 0000000000..10d123d7ec
--- /dev/null
+++ b/docs/content/2.guide/2.features/8.plugins.md
@@ -0,0 +1,7 @@
+# Plugins
+
+::NeedContribution
+::
+
+::ReadMore{link="/guide/directory-structure/plugins"}
+::
diff --git a/docs/content/2.guide/2.features/9.api-routes.md b/docs/content/2.guide/2.features/9.api-routes.md
new file mode 100644
index 0000000000..ec902b2df7
--- /dev/null
+++ b/docs/content/2.guide/2.features/9.api-routes.md
@@ -0,0 +1,7 @@
+# API Routes
+
+::NeedContribution
+::
+
+::ReadMore{link="/guide/directory-structure/server"}
+::
diff --git a/docs/content/2.guide/2.features/index.md b/docs/content/2.guide/2.features/index.md
new file mode 100644
index 0000000000..3a10d396b1
--- /dev/null
+++ b/docs/content/2.guide/2.features/index.md
@@ -0,0 +1,6 @@
+---
+title: Features
+layout.aside: true
+layout.asideClass: ''
+navigation.redirect: /guide/features/views
+---
diff --git a/docs/content/3.docs/2.directory-structure/1.nuxt.md b/docs/content/2.guide/3.directory-structure/1.nuxt.md
similarity index 100%
rename from docs/content/3.docs/2.directory-structure/1.nuxt.md
rename to docs/content/2.guide/3.directory-structure/1.nuxt.md
diff --git a/docs/content/3.docs/2.directory-structure/10.pages.md b/docs/content/2.guide/3.directory-structure/10.pages.md
similarity index 94%
rename from docs/content/3.docs/2.directory-structure/10.pages.md
rename to docs/content/2.guide/3.directory-structure/10.pages.md
index 7baa973807..54a1ade3b8 100644
--- a/docs/content/3.docs/2.directory-structure/10.pages.md
+++ b/docs/content/2.guide/3.directory-structure/10.pages.md
@@ -9,7 +9,7 @@ head.title: Pages directory
Nuxt provides a file-based routing to create routes within your web application using [Vue Router](https://router.vuejs.org) under the hood.
::alert{type="info"}
-This directory is **optional**, meaning that [`vue-router`](https://router.vuejs.org) won't be included if you only use [app.vue](/docs/directory-structure/app), reducing your application's bundle size.
+This directory is **optional**, meaning that [`vue-router`](https://router.vuejs.org) won't be included if you only use [app.vue](/guide/directory-structure/app), reducing your application's bundle size.
::
## Usage
@@ -46,7 +46,7 @@ export default defineComponent({
The `pages/index.vue` file will be mapped to the `/` route of your application.
-If you are using [app.vue](/docs/directory-structure/app), make sure to use the ` ` component to display the current page:
+If you are using [app.vue](/guide/directory-structure/app), make sure to use the ` ` component to display the current page:
```vue [app.vue]
@@ -235,11 +235,11 @@ Nuxt will automatically wrap your page in [the Vue `` component](http
#### `layout`
-You can define the layout used to render the route. This can be either false (to disable any layout), a string or a ref/computed, if you want to make it reactive in some way. [More about layouts](/docs/directory-structure/layouts).
+You can define the layout used to render the route. This can be either false (to disable any layout), a string or a ref/computed, if you want to make it reactive in some way. [More about layouts](/guide/directory-structure/layouts).
#### `middleware`
-You can define middleware to apply before loading this page. It will be merged with all the other middleware used in any matching parent/child routes. It can be a string, a function (an anonymous/inlined middleware function following [the global before guard pattern](https://router.vuejs.org/guide/advanced/navigation-guards.html#global-before-guards)), or an array of strings/functions. [More about named middleware](/docs/directory-structure/middleware).
+You can define middleware to apply before loading this page. It will be merged with all the other middleware used in any matching parent/child routes. It can be a string, a function (an anonymous/inlined middleware function following [the global before guard pattern](https://router.vuejs.org/guide/advanced/navigation-guards.html#global-before-guards)), or an array of strings/functions. [More about named middleware](/guide/directory-structure/middleware).
#### `layoutTransition` and `pageTransition`
@@ -247,7 +247,7 @@ You can define transition properties for the `` components that wrap
## Navigation
-To navigate between pages of your app, you should use the [``](/docs/usage/nuxt-link)Β component.
+To navigate between pages of your app, you should use the [``](/api/components/nuxt-link)Β component.
This component is included with Nuxt and therefore you don't have to import it as you do with other components.
@@ -260,7 +260,7 @@ A simple link to the `index.vue` page in your `pages` folder:
```
::alert{type="info"}
-Learn more about [``](/docs/usage/nuxt-link) usage.
+Learn more about [``](/api/components/nuxt-link) usage.
::
## Router options
diff --git a/docs/content/3.docs/2.directory-structure/11.plugins.md b/docs/content/2.guide/3.directory-structure/11.plugins.md
similarity index 97%
rename from docs/content/3.docs/2.directory-structure/11.plugins.md
rename to docs/content/2.guide/3.directory-structure/11.plugins.md
index e7e87ccc7d..66fcdcdcbd 100644
--- a/docs/content/3.docs/2.directory-structure/11.plugins.md
+++ b/docs/content/2.guide/3.directory-structure/11.plugins.md
@@ -31,7 +31,7 @@ Only `myPlugin.ts` and `myOtherPlugin/index.ts` would be registered.
## Creating plugins
-The only argument passed to a plugin is [`nuxtApp`](/docs/usage/nuxt-app).
+The only argument passed to a plugin is [`nuxtApp`](/api/composables/use-nuxt-app).
```ts
export default defineNuxtPlugin(nuxtApp => {
diff --git a/docs/content/3.docs/2.directory-structure/12.public.md b/docs/content/2.guide/3.directory-structure/12.public.md
similarity index 100%
rename from docs/content/3.docs/2.directory-structure/12.public.md
rename to docs/content/2.guide/3.directory-structure/12.public.md
diff --git a/docs/content/3.docs/2.directory-structure/13.server.md b/docs/content/2.guide/3.directory-structure/13.server.md
similarity index 97%
rename from docs/content/3.docs/2.directory-structure/13.server.md
rename to docs/content/2.guide/3.directory-structure/13.server.md
index e53ab55a77..a19d6d9f3f 100644
--- a/docs/content/3.docs/2.directory-structure/13.server.md
+++ b/docs/content/2.guide/3.directory-structure/13.server.md
@@ -103,5 +103,5 @@ export default async (req, res) => {
```
::alert{type=info icon=π}
-Find more information about custom middleware in the documentation for [nuxt.config.js](/docs/directory-structure/nuxt.config#servermiddleware)
+Find more information about custom middleware in the documentation for [nuxt.config.js](/guide/directory-structure/nuxt.config#servermiddleware)
::
diff --git a/docs/content/3.docs/2.directory-structure/14.gitignore.md b/docs/content/2.guide/3.directory-structure/14.gitignore.md
similarity index 100%
rename from docs/content/3.docs/2.directory-structure/14.gitignore.md
rename to docs/content/2.guide/3.directory-structure/14.gitignore.md
diff --git a/docs/content/3.docs/2.directory-structure/15.app.md b/docs/content/2.guide/3.directory-structure/15.app.md
similarity index 61%
rename from docs/content/3.docs/2.directory-structure/15.app.md
rename to docs/content/2.guide/3.directory-structure/15.app.md
index f6c7a707df..667dd352c7 100644
--- a/docs/content/3.docs/2.directory-structure/15.app.md
+++ b/docs/content/2.guide/3.directory-structure/15.app.md
@@ -10,7 +10,7 @@ The `app.vue` file is the main component in your Nuxt 3 applications.
## Minimal usage
-With Nuxt 3, the [`pages/`](/docs/directory-structure/pages) directory is optional. If not present, Nuxt won't include [vue-router](https://router.vuejs.org/) dependency. This is useful when working on a landing page or an application that does not need routing.
+With Nuxt 3, the [`pages/`](/guide/directory-structure/pages) directory is optional. If not present, Nuxt won't include [vue-router](https://router.vuejs.org/) dependency. This is useful when working on a landing page or an application that does not need routing.
```vue [app.vue]
@@ -20,7 +20,7 @@ With Nuxt 3, the [`pages/`](/docs/directory-structure/pages) directory is option
## Usage with pages
-If you have a [`pages/`](/docs/directory-structure/pages) directory, to display the current page, use the `` component:
+If you have a [`pages/`](/guide/directory-structure/pages) directory, to display the current page, use the `` component:
```vue [app.vue]
@@ -40,4 +40,4 @@ Since Nuxt 3 uses [``](https://vuejs.org/guide/built-ins/suspense.html
Remember that `app.vue` acts as the main component of your Nuxt application. Anything you add in it (JS and CSS) will be global and included in every page.
::
-If you want to have the possibility to customize the structure around the page between pages, check out the [`layouts/`](/docs/directory-structure/layouts) directory.
+If you want to have the possibility to customize the structure around the page between pages, check out the [`layouts/`](/guide/directory-structure/layouts) directory.
diff --git a/docs/content/3.docs/2.directory-structure/17.nuxtignore.md b/docs/content/2.guide/3.directory-structure/17.nuxtignore.md
similarity index 77%
rename from docs/content/3.docs/2.directory-structure/17.nuxtignore.md
rename to docs/content/2.guide/3.directory-structure/17.nuxtignore.md
index 7676f2f3d9..169696cd0a 100644
--- a/docs/content/3.docs/2.directory-structure/17.nuxtignore.md
+++ b/docs/content/2.guide/3.directory-structure/17.nuxtignore.md
@@ -8,7 +8,7 @@ head.title: .nuxtignore file
You can use a `.nuxtignore` file to let Nuxt ignore `layout`, `pages`, `components`, `composables` and `middleware` files in your projectβs root directory (`rootDir`) during the build phase. The `.nuxtignore` file is subject to the same specification as `.gitignore` and `.eslintignore` files, in which each line is a glob pattern indicating which files should be ignored.
-**Note**: You can also configure [`ignoreOptions`](/docs/directory-structure/nuxt.config#ignoreoptions), [`ignorePrefix`](/docs/directory-structure/nuxt.config#ignoreprefix) and [`ignore`](/docs/directory-structure/nuxt.config#ignore) in your `nuxt.config` file.
+**Note**: You can also configure [`ignoreOptions`](/guide/directory-structure/nuxt.config#ignoreoptions), [`ignorePrefix`](/guide/directory-structure/nuxt.config#ignoreprefix) and [`ignore`](/guide/directory-structure/nuxt.config#ignore) in your `nuxt.config` file.
## Example
diff --git a/docs/content/2.guide/3.directory-structure/18.nuxt.config.md b/docs/content/2.guide/3.directory-structure/18.nuxt.config.md
new file mode 100644
index 0000000000..0d77a2f0b7
--- /dev/null
+++ b/docs/content/2.guide/3.directory-structure/18.nuxt.config.md
@@ -0,0 +1,20 @@
+---
+icon: IconFile
+title: nuxt.config.ts
+head.title: Nuxt configuration file
+---
+
+# Nuxt configuration file
+
+Nuxt can be easily configured with a single `nuxt.config` file, which can have either a `.js`, `.ts` or `.mjs` extension.
+
+```ts
+import { defineNuxtConfig } from 'nuxt3'
+
+export default defineNuxtConfig({
+ // My Nuxt config
+})
+```
+
+::ReadMore{link="/api/configuration/nuxt.config"}
+::
diff --git a/docs/content/3.docs/2.directory-structure/18.package.md b/docs/content/2.guide/3.directory-structure/18.package.md
similarity index 100%
rename from docs/content/3.docs/2.directory-structure/18.package.md
rename to docs/content/2.guide/3.directory-structure/18.package.md
diff --git a/docs/content/3.docs/2.directory-structure/19.tsconfig.md b/docs/content/2.guide/3.directory-structure/19.tsconfig.md
similarity index 63%
rename from docs/content/3.docs/2.directory-structure/19.tsconfig.md
rename to docs/content/2.guide/3.directory-structure/19.tsconfig.md
index 20df6a6bdc..0b23aee372 100644
--- a/docs/content/3.docs/2.directory-structure/19.tsconfig.md
+++ b/docs/content/2.guide/3.directory-structure/19.tsconfig.md
@@ -6,7 +6,7 @@ head.title: TypeScript configuration file
# TypeScript configuration file
-Nuxt [automatically generates](/concepts/typescript) a `.nuxt/tsconfig.json` file with the resolved aliases you are using in your Nuxt project, as well as with other sensible defaults. You can benefit from this by creating a `tsconfig.json` in the root of your project with the following content:
+Nuxt [automatically generates](/guide/concepts/typescript) a `.nuxt/tsconfig.json` file with the resolved aliases you are using in your Nuxt project, as well as with other sensible defaults. You can benefit from this by creating a `tsconfig.json` in the root of your project with the following content:
```json
{
diff --git a/docs/content/3.docs/2.directory-structure/2.output.md b/docs/content/2.guide/3.directory-structure/2.output.md
similarity index 86%
rename from docs/content/3.docs/2.directory-structure/2.output.md
rename to docs/content/2.guide/3.directory-structure/2.output.md
index 1922d228f4..c044b064fe 100644
--- a/docs/content/3.docs/2.directory-structure/2.output.md
+++ b/docs/content/2.guide/3.directory-structure/2.output.md
@@ -12,4 +12,4 @@ Nuxt creates the `.output/` directory when building your application for product
You should not touch any files inside since the whole directory will be re-created when running `nuxt build`.
::
-Use this directory to deploy your Nuxt application to production. Learn more in our [deployment section](/docs/deployment).
+Use this directory to deploy your Nuxt application to production. Learn more in our [deployment section](/guide/deployment).
diff --git a/docs/content/3.docs/2.directory-structure/3.assets.md b/docs/content/2.guide/3.directory-structure/3.assets.md
similarity index 68%
rename from docs/content/3.docs/2.directory-structure/3.assets.md
rename to docs/content/2.guide/3.directory-structure/3.assets.md
index 6c8ebd9553..01c7d94c58 100644
--- a/docs/content/3.docs/2.directory-structure/3.assets.md
+++ b/docs/content/2.guide/3.directory-structure/3.assets.md
@@ -12,6 +12,6 @@ The directory usually contains the following types of files:
- Stylesheets (CSS, SASS, etc.)
- Fonts
-- Images that won't be served from the [`public/`](/docs/directory-structure/public) directory.
+- Images that won't be served from the [`public/`](/guide/directory-structure/public) directory.
-If you want to serve assets from the server, we recommend taking a look at the [`public/`](/docs/directory-structure/public) directory.
+If you want to serve assets from the server, we recommend taking a look at the [`public/`](/guide/directory-structure/public) directory.
diff --git a/docs/content/3.docs/2.directory-structure/4.components.md b/docs/content/2.guide/3.directory-structure/4.components.md
similarity index 100%
rename from docs/content/3.docs/2.directory-structure/4.components.md
rename to docs/content/2.guide/3.directory-structure/4.components.md
diff --git a/docs/content/3.docs/2.directory-structure/5.composables.md b/docs/content/2.guide/3.directory-structure/5.composables.md
similarity index 97%
rename from docs/content/3.docs/2.directory-structure/5.composables.md
rename to docs/content/2.guide/3.directory-structure/5.composables.md
index a519084cfa..35d8f6fcbb 100644
--- a/docs/content/3.docs/2.directory-structure/5.composables.md
+++ b/docs/content/2.guide/3.directory-structure/5.composables.md
@@ -6,7 +6,7 @@ head.title: Composables directory
# Composables directory
-Nuxt 3 supports `composables/` directory to automatically import your Vue composables into your application using [auto-imports](/concepts/auto-imports)!
+Nuxt 3 supports `composables/` directory to automatically import your Vue composables into your application using [auto-imports](/guide/concepts/auto-imports)!
## How files are scanned
diff --git a/docs/content/3.docs/2.directory-structure/6.layouts.md b/docs/content/2.guide/3.directory-structure/6.layouts.md
similarity index 94%
rename from docs/content/3.docs/2.directory-structure/6.layouts.md
rename to docs/content/2.guide/3.directory-structure/6.layouts.md
index 4ec99233bb..0e7656b0f5 100644
--- a/docs/content/3.docs/2.directory-structure/6.layouts.md
+++ b/docs/content/2.guide/3.directory-structure/6.layouts.md
@@ -10,7 +10,7 @@ Nuxt provides a customizable layouts framework you can use throughout your appli
Layouts are placed in the `layouts/` directory and will be automatically loaded via asynchronous import when used. Layouts are used by setting a `layout` property as part of your page metadata (if you are using the `~/pages` integration), or by using the `` component.
-If you only have a single layout in your application, we recommend to use [app.vue](/docs/directory-structure/app) instead.
+If you only have a single layout in your application, we recommend to use [app.vue](/guide/directory-structure/app) instead.
::alert{type=warning}
Unlike other components, your layouts must have a single root element to allow Nuxt to apply transitions between layout changes.
@@ -66,7 +66,7 @@ definePageMeta({
```
::alert{type=info}
-Learn more about [defining page meta](/docs/directory-structure/pages#page-metadata).
+Learn more about [defining page meta](/guide/directory-structure/pages#page-metadata).
::
## Example: manual control with `~/pages`
diff --git a/docs/content/3.docs/2.directory-structure/7.middleware.md b/docs/content/2.guide/3.directory-structure/7.middleware.md
similarity index 98%
rename from docs/content/3.docs/2.directory-structure/7.middleware.md
rename to docs/content/2.guide/3.directory-structure/7.middleware.md
index 66a4cbaf6d..160c72c8aa 100644
--- a/docs/content/3.docs/2.directory-structure/7.middleware.md
+++ b/docs/content/2.guide/3.directory-structure/7.middleware.md
@@ -18,7 +18,7 @@ There are three kinds of route middleware:
2. Named route middleware, which are placed in the `middleware/` directory and will be automatically loaded via asynchronous import when used on a page.
3. Global route middleware, which are placed in the `middleware/` directory (with a `.global` suffix) and will be automatically run on every route change.
-The first two kinds of route middleware can be [defined in `definePageMeta`](/docs/directory-structure/pages).
+The first two kinds of route middleware can be [defined in `definePageMeta`](/guide/directory-structure/pages).
## Format
diff --git a/docs/content/3.docs/2.directory-structure/9.node_modules.md b/docs/content/2.guide/3.directory-structure/9.node_modules.md
similarity index 100%
rename from docs/content/3.docs/2.directory-structure/9.node_modules.md
rename to docs/content/2.guide/3.directory-structure/9.node_modules.md
diff --git a/docs/content/3.docs/2.directory-structure/index.md b/docs/content/2.guide/3.directory-structure/index.md
similarity index 50%
rename from docs/content/3.docs/2.directory-structure/index.md
rename to docs/content/2.guide/3.directory-structure/index.md
index 26215000ce..c2d7daa964 100644
--- a/docs/content/3.docs/2.directory-structure/index.md
+++ b/docs/content/2.guide/3.directory-structure/index.md
@@ -2,6 +2,5 @@
title: 'Directory structure'
layout.aside: true
layout.asideClass: ''
-navigation.collapse: false
-navigation.redirect: /docs/directory-structure/app
+navigation.redirect: /guide/directory-structure/nuxt
---
diff --git a/docs/content/3.docs/8.deployment/1.azure.md b/docs/content/2.guide/5.deployment/1.azure.md
similarity index 100%
rename from docs/content/3.docs/8.deployment/1.azure.md
rename to docs/content/2.guide/5.deployment/1.azure.md
diff --git a/docs/content/3.docs/8.deployment/2.cloudflare.md b/docs/content/2.guide/5.deployment/2.cloudflare.md
similarity index 96%
rename from docs/content/3.docs/8.deployment/2.cloudflare.md
rename to docs/content/2.guide/5.deployment/2.cloudflare.md
index c2f36acdec..cf941e37a4 100644
--- a/docs/content/3.docs/8.deployment/2.cloudflare.md
+++ b/docs/content/2.guide/5.deployment/2.cloudflare.md
@@ -129,7 +129,7 @@ jobs:
## More information
-See [more information on the service worker preset](/docs/deployment/presets/service-worker) for full details.
+See [more information on the service worker preset](/guide/deployment/presets/service-worker) for full details.
## Demo
diff --git a/docs/content/3.docs/8.deployment/3.firebase.md b/docs/content/2.guide/5.deployment/3.firebase.md
similarity index 100%
rename from docs/content/3.docs/8.deployment/3.firebase.md
rename to docs/content/2.guide/5.deployment/3.firebase.md
diff --git a/docs/content/3.docs/8.deployment/4.netlify.md b/docs/content/2.guide/5.deployment/4.netlify.md
similarity index 83%
rename from docs/content/3.docs/8.deployment/4.netlify.md
rename to docs/content/2.guide/5.deployment/4.netlify.md
index 9414e20a7e..df8fab3f50 100644
--- a/docs/content/3.docs/8.deployment/4.netlify.md
+++ b/docs/content/2.guide/5.deployment/4.netlify.md
@@ -18,7 +18,7 @@ How to deploy Nuxt to Netlify.
Nitro will auto-detect that you are in a [Netlify](https://www.netlify.com) environment and build the correct version of your Nuxt server. For new sites, Netlify will detect that you are using Nuxt 3 or bridge and set the publish directory to `dist` and build command to `npm run build`. If you are upgrading an existing site you should check these and update them if needed.
Normally, the deployment to Netlify does not require any configuration.
-However, if you want to add custom redirects, you can do so by adding a [`_redirects`](https://docs.netlify.com/routing/redirects/#syntax-for-the-redirects-file) file in the [`public`](/docs/directory-structure/public) directory.
+However, if you want to add custom redirects, you can do so by adding a [`_redirects`](https://docs.netlify.com/routing/redirects/#syntax-for-the-redirects-file) file in the [`public`](/guide/directory-structure/public) directory.
## Deployment
@@ -26,7 +26,7 @@ Just push to your git repository [as you would normally do for Netlify](https://
## More information
-See [more information on the Lambda preset](/docs/deployment/presets/lambda) for full details.
+See [more information on the Lambda preset](/guide/deployment/presets/lambda) for full details.
## Demo
diff --git a/docs/content/3.docs/8.deployment/5.pm2.md b/docs/content/2.guide/5.deployment/5.pm2.md
similarity index 93%
rename from docs/content/3.docs/8.deployment/5.pm2.md
rename to docs/content/2.guide/5.deployment/5.pm2.md
index 44950f8a0d..d2455c390f 100644
--- a/docs/content/3.docs/8.deployment/5.pm2.md
+++ b/docs/content/2.guide/5.deployment/5.pm2.md
@@ -55,4 +55,4 @@ module.exports = {
## More information
-See more information on the [server preset](/docs/deployment/presets/server).
+See more information on the [server preset](/guide/deployment/presets/server).
diff --git a/docs/content/3.docs/8.deployment/6.vercel.md b/docs/content/2.guide/5.deployment/6.vercel.md
similarity index 93%
rename from docs/content/3.docs/8.deployment/6.vercel.md
rename to docs/content/2.guide/5.deployment/6.vercel.md
index 41b3012bed..7372052b77 100644
--- a/docs/content/3.docs/8.deployment/6.vercel.md
+++ b/docs/content/2.guide/5.deployment/6.vercel.md
@@ -38,7 +38,7 @@ Learn more about Vercelβs [Git Integration](https://vercel.com/docs/concepts/g
## More information
-See [more information on the node preset](/docs/deployment/presets/node) for full details.
+See [more information on the node preset](/guide/deployment/presets/node) for full details.
## Demo
diff --git a/docs/content/2.guide/5.deployment/99.presets.md b/docs/content/2.guide/5.deployment/99.presets.md
new file mode 100644
index 0000000000..27eb5a7574
--- /dev/null
+++ b/docs/content/2.guide/5.deployment/99.presets.md
@@ -0,0 +1,17 @@
+---
+icon: IconPresets
+---
+
+# Presets
+
+Nuxt provides four generic presets that you can use out-of-the-box.
+
+::list{type=success}
+
+- [Node.js server *(default)*](/guide/deployment/presets/server)
+- [Node.js function](/guide/deployment/presets/node)
+- [Lambda function](/guide/deployment/presets/lambda)
+- [Service worker](/guide/deployment/presets/service-worker)
+::
+
+If you need to [create a custom preset](/guide/deployment/presets/custom), that's possible too. π
diff --git a/docs/content/3.docs/8.deployment/99.presets/custom.md b/docs/content/2.guide/5.deployment/99.presets/custom.md
similarity index 95%
rename from docs/content/3.docs/8.deployment/99.presets/custom.md
rename to docs/content/2.guide/5.deployment/99.presets/custom.md
index fb1a761453..3a7b355eed 100644
--- a/docs/content/3.docs/8.deployment/99.presets/custom.md
+++ b/docs/content/2.guide/5.deployment/99.presets/custom.md
@@ -9,7 +9,7 @@ Get full control of Nuxt Nitro output to deploy on any kind of hosting platform.
::
::alert{icon=IconPresets}
-Back to [presets list](/docs/deployment/presets).
+Back to [presets list](/guide/deployment/presets).
::
## Setup
diff --git a/docs/content/3.docs/8.deployment/99.presets/lambda.md b/docs/content/2.guide/5.deployment/99.presets/lambda.md
similarity index 88%
rename from docs/content/3.docs/8.deployment/99.presets/lambda.md
rename to docs/content/2.guide/5.deployment/99.presets/lambda.md
index f447373324..da26b12242 100644
--- a/docs/content/3.docs/8.deployment/99.presets/lambda.md
+++ b/docs/content/2.guide/5.deployment/99.presets/lambda.md
@@ -3,12 +3,12 @@
Discover the Lambda function preset with Nitro to deploy Nuxt to any lambda-compatible serverless platform.
::alert{icon=IconPresets}
-Back to [presets list](/docs/deployment/presets).
+Back to [presets list](/guide/deployment/presets).
::
## Usage
-You can use the [Nuxt config](/docs/directory-structure/nuxt.config) to explicitly set the preset to use:
+You can use the [Nuxt config](/guide/directory-structure/nuxt.config) to explicitly set the preset to use:
```ts [nuxt.config.js|ts]
export default {
diff --git a/docs/content/3.docs/8.deployment/99.presets/node.md b/docs/content/2.guide/5.deployment/99.presets/node.md
similarity index 88%
rename from docs/content/3.docs/8.deployment/99.presets/node.md
rename to docs/content/2.guide/5.deployment/99.presets/node.md
index 61d9be93a6..582e8975c8 100644
--- a/docs/content/3.docs/8.deployment/99.presets/node.md
+++ b/docs/content/2.guide/5.deployment/99.presets/node.md
@@ -10,12 +10,12 @@ Discover the Node.js function preset with Nitro to attach Nuxt as a middleware t
::
::alert{icon=IconPresets}
-Back to [presets list](/docs/deployment/presets).
+Back to [presets list](/guide/deployment/presets).
::
## Usage
-You can use the [Nuxt config](/docs/directory-structure/nuxt.config) to explicitly set the preset to use:
+You can use the [Nuxt config](/guide/directory-structure/nuxt.config) to explicitly set the preset to use:
```js [nuxt.config.js|ts]
export default {
diff --git a/docs/content/3.docs/8.deployment/99.presets/server.md b/docs/content/2.guide/5.deployment/99.presets/server.md
similarity index 92%
rename from docs/content/3.docs/8.deployment/99.presets/server.md
rename to docs/content/2.guide/5.deployment/99.presets/server.md
index ef9a87623c..cb865eef7d 100644
--- a/docs/content/3.docs/8.deployment/99.presets/server.md
+++ b/docs/content/2.guide/5.deployment/99.presets/server.md
@@ -10,12 +10,12 @@ Discover the Node.js server preset with Nitro to deploy on any Node hosting.
::
::alert{icon=IconPresets}
-Back to [presets list](/docs/deployment/presets).
+Back to [presets list](/guide/deployment/presets).
::
## Usage
-You can use the [Nuxt config](/docs/directory-structure/nuxt.config) to explicitly set the preset to use:
+You can use the [Nuxt config](/guide/directory-structure/nuxt.config) to explicitly set the preset to use:
```js [nuxt.config.js|ts]
export default {
diff --git a/docs/content/3.docs/8.deployment/99.presets/service-worker.md b/docs/content/2.guide/5.deployment/99.presets/service-worker.md
similarity index 77%
rename from docs/content/3.docs/8.deployment/99.presets/service-worker.md
rename to docs/content/2.guide/5.deployment/99.presets/service-worker.md
index b54f501739..8bad9df373 100644
--- a/docs/content/3.docs/8.deployment/99.presets/service-worker.md
+++ b/docs/content/2.guide/5.deployment/99.presets/service-worker.md
@@ -10,7 +10,7 @@ Explore the Service worker preset with Nitro to push the boundaries of Nuxt rend
::
::alert{icon=IconPresets}
-Back to [presets list](/docs/deployment/presets).
+Back to [presets list](/guide/deployment/presets).
::
::alert{type=warning}
@@ -19,7 +19,7 @@ Deployment as service worker has some limitations since SSR code is not running
## Usage
-You can use the [Nuxt config](/docs/directory-structure/nuxt.config) to explicitly set the preset to use:
+You can use the [Nuxt config](/guide/directory-structure/nuxt.config) to explicitly set the preset to use:
```js [nuxt.config.js|ts]
export default {
@@ -37,6 +37,6 @@ NITRO_PRESET=worker npx nuxt build
## Entry point
-The worker preset produces a service worker that can provide full HTML rendering within a worker context (for example [Cloudflare Workers](/docs/deployment/cloudflare)). It registers appropriate handlers for `fetch`, `install` and `activate`.
+The worker preset produces a service worker that can provide full HTML rendering within a worker context (for example [Cloudflare Workers](/guide/deployment/cloudflare)). It registers appropriate handlers for `fetch`, `install` and `activate`.
For more information you can see the [source code](https://github.com/nuxt/framework/blob/main/packages/nitro/src/runtime/entries/service-worker.ts).
diff --git a/docs/content/3.docs/8.deployment/index.md b/docs/content/2.guide/5.deployment/index.md
similarity index 58%
rename from docs/content/3.docs/8.deployment/index.md
rename to docs/content/2.guide/5.deployment/index.md
index 637b056f41..8caec21140 100644
--- a/docs/content/3.docs/8.deployment/index.md
+++ b/docs/content/2.guide/5.deployment/index.md
@@ -3,7 +3,7 @@ layout:
aside: true
asideClass: ''
navigation:
- collapse: false
+ collapse: true
exclusive: false
- redirect: /docs/deployment/presets
+ redirect: /guide/deployment/presets
---
diff --git a/docs/content/3.docs/9.advanced/1.nuxt.md b/docs/content/2.guide/6.going-further/1.internals.md
similarity index 78%
rename from docs/content/3.docs/9.advanced/1.nuxt.md
rename to docs/content/2.guide/6.going-further/1.internals.md
index 80db056ca4..e5a8c6cd1e 100644
--- a/docs/content/3.docs/9.advanced/1.nuxt.md
+++ b/docs/content/2.guide/6.going-further/1.internals.md
@@ -1,4 +1,4 @@
-# Nuxt Internals
+# How Nuxt Works?
Nuxt is a minimal but highly customizable framework to build web applications. This guide helps you better understand Nuxt internals to develop new solutions and module integrations on top of Nuxt.
@@ -6,13 +6,13 @@ Nuxt is a minimal but highly customizable framework to build web applications. T
When you start nuxt in development mode with `nuxi dev` or building a production application with `nuxi build`,
a common context will be created, referred to as `nuxt` internally. It holds normalized options merged with `nuxt.config` file,
-some internal state, and a powerful [hooking system](/docs/advanced/hooks) powered by [unjs/hookable](https://github.com/unjs/hookable)
+some internal state, and a powerful [hooking system](/api/advanced/hooks) powered by [unjs/hookable](https://github.com/unjs/hookable)
allowing different components to communicate with each other. You can think of it as **Builder Core**.
-This context is globally available to be used with [nuxt/kit](/docs/advanced/kit) composables.
+This context is globally available to be used with [nuxt/kit](/api/advanced/kit) composables.
Therefore only one instance of Nuxt is allowed to run per process.
-To extend the Nuxt interface and hook into different stages of the build process, we can use [Nuxt Modules](/docs/advanced/modules).
+To extend the Nuxt interface and hook into different stages of the build process, we can use [Nuxt Modules](/guide/going-further/modules).
For more details, check out [the source code](https://github.com/nuxt/framework/blob/main/packages/nuxt3/src/core/nuxt.ts).
@@ -25,9 +25,9 @@ You can think of it as **Runtime Core**.
This context can be accessed using `useNuxtApp()` composable within nuxt plugins and `
```
```ts [server/api/hello.ts]
-import config from '#config';
+import config from '#config'
export default (req, res) => {
// you can now access config.BASE_URL
diff --git a/docs/content/migration/index.md b/docs/content/migration/index.md
new file mode 100644
index 0000000000..2a7663145d
--- /dev/null
+++ b/docs/content/migration/index.md
@@ -0,0 +1,6 @@
+---
+navigation.exclusive: true
+navigation.redirect: /migration/overview
+layout.aside: true
+layout.asideClass: ''
+---
diff --git a/docs/package.json b/docs/package.json
index b2e2790687..138f6cadd9 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -5,6 +5,8 @@
"dev": "yarn gendocs && nuxt dev",
"build": "yarn gendocs && nuxt generate --force-build",
"build:ci": "./scripts/make-schema.sh && yarn build",
+ "lint:docs": "cd .. && yarn lint:docs",
+ "lint:docs:fix": "cd .. && yarn lint:docs:fix",
"gendocs": "jiti ./scripts/gen-docs.ts"
},
"devDependencies": {
diff --git a/docs/scripts/gen-docs.ts b/docs/scripts/gen-docs.ts
index 5bc874b021..32928339df 100644
--- a/docs/scripts/gen-docs.ts
+++ b/docs/scripts/gen-docs.ts
@@ -1,4 +1,5 @@
-import { readFile, writeFile } from 'fs/promises'
+import { readFile, writeFile, mkdir } from 'fs/promises'
+import { dirname } from 'path'
import type { Schema } from 'untyped'
import { resolve } from 'pathe'
import { upperFirst } from 'scule'
@@ -6,7 +7,7 @@ import { upperFirst } from 'scule'
export async function main () {
const rootDir = resolve(__dirname, '..')
const configTemplate = resolve(__dirname, 'nuxt.config.md')
- const configFile = resolve(rootDir, 'content/3.docs/2.directory-structure/16.nuxt.config.md')
+ const configFile = resolve(rootDir, 'content/3.api/6.configuration/nuxt.config.md')
await generateDocs({ configFile, configTemplate })
}
@@ -38,11 +39,15 @@ function generateMarkdown (schema: Schema, title: string, level: string, parentV
lines.push(`- **Type**: \`${schema.type}\``)
}
const defaultValue = formatValue(schema.default)
- if (defaultValue) {
- lines.push('- **Default**', ...defaultValue)
+ if (defaultValue && defaultValue.length) {
+ if (defaultValue.length === 1) {
+ lines.push(`- **Default:** ${defaultValue[0]}`)
+ } else {
+ lines.push('- **Default**', ...defaultValue)
+ }
}
- lines.push(`- **Version**: ${versions.join(', ')}`)
+ // lines.push(`- **Version**: ${versions.join(', ')}`)
lines.push('')
}
@@ -92,8 +97,12 @@ const InternalTypes = new Set([
function formatValue (val) {
const stringified = JSON.stringify(val, null, 2)
- if (stringified === '{}' || stringified === '[]') { return null }
- return ['```json', stringified, '```']
+ if (!stringified || stringified === '{}' || stringified === '[]') { return null }
+ if (stringified.includes('\n')) {
+ return ['```json', stringified, '```']
+ } else {
+ return ['`' + stringified + '`']
+ }
}
function renderTag (tag: string) {
@@ -141,6 +150,7 @@ async function generateDocs ({ configFile, configTemplate }) {
}
const body = template.replace(GENERATE_KEY, generatedDocs)
+ await mkdir(dirname(configFile), { recursive: true })
await writeFile(configFile, body)
console.log(`Generate done in ${(Date.now() - start) / 1000} seconds!`)
diff --git a/docs/scripts/nuxt.config.md b/docs/scripts/nuxt.config.md
index be8a41c528..119ccae5f4 100644
--- a/docs/scripts/nuxt.config.md
+++ b/docs/scripts/nuxt.config.md
@@ -1,21 +1,17 @@
---
-icon: IconFile
-title: nuxt.config.ts
-head.title: Nuxt configuration file
+title: Nuxt Config
+head.title: Nuxt configuration reference
---
-# Nuxt configuration file
+# Nuxt configuration reference
-Nuxt can be easily configured with a single `nuxt.config` file, which can have either a `.js`, `.ts` or `.mjs` extension.
+::AutoGenerated
+::
-```ts
-import { defineNuxtConfig } from 'nuxt3'
-
-export default defineNuxtConfig({
- // My Nuxt config
-})
-```
-
-Learn more about all the different config properties
+::ReadMore{link="/guide/directory-structure/nuxt.config"}
+::
+
+::AutoGenerated
+::
diff --git a/docs/static/_redirects b/docs/static/_redirects
new file mode 100644
index 0000000000..3045606daf
--- /dev/null
+++ b/docs/static/_redirects
@@ -0,0 +1,33 @@
+# Getting started
+/getting-started/introduction /getting-started/quick-start 302!
+/getting-started/installation /getting-started/quick-start 302!
+/getting-started/commands /api/commands/add 302!
+/getting-started/bridge /bridge 302!
+# Concepts
+/concepts/introduction /guide/concepts/introduction 302!
+/concepts/vuejs-development /guide/concepts/vuejs-development 302!
+/concepts/rendering /guide/concepts/rendering 302!
+/concepts/auto-imports /guide/concepts/auto-imports 302!
+/concepts/server-engine /guide/concepts/server-engine 302!
+/concepts/typescript /guide/concepts/typescript 302!
+/concepts/esm /guide/going-further/esm 302!
+# Docs
+/docs/usage/data-fetching /guide/features/data-fetching 302!
+/docs/usage/state /guide/features/state-management 302!
+/docs/usage/meta-tags /guide/features/head-management 302!
+/docs/usage/nuxt-app /guide/going-further/nuxt-app 302!
+/docs/usage/runtime-config /guide/going-further/runtime-config 302!
+/docs/usage/cookies /api/composables/use-cookie 302!
+/docs/usage/ssr /api/composables/use-request-headers 302!
+/docs/usage/cli /api/commands/add 302!
+/docs/usage/error-handling /guide/features/error-handling 302!
+/docs/usage/nuxt-link /api/components/nuxt-link 302!
+/docs/usage/teleports /guide/features/teleports 302!
+/docs/directory-structure/* /guide/directory-structure/:splat 302!
+/docs/deployment/* /guide/deployment/:splat 302!
+/docs/advanced/testing /guide/going-further/testing 302!
+/docs/advanced/nuxt /guide/going-further/internals 302!
+/docs/advanced/modules /guide/going-further/modules 302!
+/docs/advanced/kit /guide/going-further/kit 302!
+/docs/advanced/hooks /guide/going-further/hooks 302!
+/docs/migration/* /migration/:splat 302!
diff --git a/examples/advanced/test/app.vue b/examples/advanced/testing/app.vue
similarity index 100%
rename from examples/advanced/test/app.vue
rename to examples/advanced/testing/app.vue
diff --git a/examples/advanced/test/nuxt.config.ts b/examples/advanced/testing/nuxt.config.ts
similarity index 100%
rename from examples/advanced/test/nuxt.config.ts
rename to examples/advanced/testing/nuxt.config.ts
diff --git a/examples/advanced/test/package.json b/examples/advanced/testing/package.json
similarity index 85%
rename from examples/advanced/test/package.json
rename to examples/advanced/testing/package.json
index 50a91c5b67..42bac9855c 100644
--- a/examples/advanced/test/package.json
+++ b/examples/advanced/testing/package.json
@@ -1,5 +1,5 @@
{
- "name": "example-test",
+ "name": "example-testing",
"private": true,
"scripts": {
"build": "nuxi build",
diff --git a/examples/advanced/test/tests/basic.test.ts b/examples/advanced/testing/tests/basic.test.ts
similarity index 100%
rename from examples/advanced/test/tests/basic.test.ts
rename to examples/advanced/testing/tests/basic.test.ts
diff --git a/examples/advanced/test/tsconfig.json b/examples/advanced/testing/tsconfig.json
similarity index 100%
rename from examples/advanced/test/tsconfig.json
rename to examples/advanced/testing/tsconfig.json
diff --git a/package.json b/package.json
index b495a4cbc3..504cb43267 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,8 @@
"example": "yarn workspace example-$0 dev",
"example:build": "yarn workspace example-$0 build",
"lint": "eslint --ext .vue,.ts,.js,.mjs .",
- "lint:docs": "./node_modules/.bin/markdownlint ./ && case-police '**/*.md'",
+ "lint:docs": "markdownlint ./docs/content && case-police 'docs/content**/*.md'",
+ "lint:docs:fix": "markdownlint ./docs/content --fix && case-police 'docs/content**/*.md' --fix",
"nuxi": "./node_modules/.bin/nuxi",
"nuxt": "./node_modules/.bin/nuxi",
"play": "echo use yarn dev && exit 1",
diff --git a/yarn.lock b/yarn.lock
index 577c2be6fe..6b84dc58d6 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10851,9 +10851,9 @@ __metadata:
languageName: unknown
linkType: soft
-"example-test@workspace:examples/advanced/test":
+"example-testing@workspace:examples/advanced/testing":
version: 0.0.0-use.local
- resolution: "example-test@workspace:examples/advanced/test"
+ resolution: "example-testing@workspace:examples/advanced/testing"
dependencies:
nuxt3: latest
languageName: unknown