From fa8c27720b0873971246718dba423348d4f0ec64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C3=ABl=20Guilloux?= Date: Fri, 17 Jun 2022 15:00:31 +0200 Subject: [PATCH] feat(content): update content to latest Docus --- docs/content/1.getting-started/2.migration.md | 7 ++++--- docs/content/1.getting-started/_dir.yml | 1 + docs/content/1.getting-started/index.md | 1 - docs/content/2.guide/1.concepts/1.introduction.md | 7 ++++--- .../2.guide/1.concepts/2.vuejs-development.md | 7 ++++--- docs/content/2.guide/1.concepts/3.rendering.md | 7 ++++--- docs/content/2.guide/1.concepts/4.auto-imports.md | 7 ++++--- docs/content/2.guide/1.concepts/4.server-engine.md | 8 +++++--- docs/content/2.guide/1.concepts/6.typescript.md | 7 ++++--- docs/content/2.guide/1.concepts/index.md | 2 +- docs/content/2.guide/2.features/1.views.md | 4 +++- docs/content/2.guide/2.features/10.runtime-config.md | 7 ++++--- docs/content/2.guide/2.features/11.teleports.md | 9 +++++---- docs/content/2.guide/2.features/13.modules.md | 7 +++++-- docs/content/2.guide/2.features/2.routing.md | 4 +++- docs/content/2.guide/2.features/3.assets.md | 7 ++++--- docs/content/2.guide/2.features/4.head-management.md | 7 ++++--- docs/content/2.guide/2.features/5.data-fetching.md | 7 ++++--- .../content/2.guide/2.features/6.state-management.md | 7 ++++--- docs/content/2.guide/2.features/7.error-handling.md | 4 +++- docs/content/2.guide/2.features/8.plugins.md | 4 +++- docs/content/2.guide/2.features/9.server-routes.md | 7 ++++--- docs/content/2.guide/2.features/index.md | 2 +- docs/content/2.guide/3.directory-structure/1.nuxt.md | 10 +++------- .../2.guide/3.directory-structure/10.pages.md | 9 +++------ .../2.guide/3.directory-structure/11.plugins.md | 9 ++++----- .../2.guide/3.directory-structure/12.public.md | 7 +++---- .../2.guide/3.directory-structure/13.server.md | 6 ++---- .../2.guide/3.directory-structure/14.gitignore.md | 9 ++++----- docs/content/2.guide/3.directory-structure/15.app.md | 9 +++------ .../2.guide/3.directory-structure/18.nuxt-config.md | 9 ++++----- .../2.guide/3.directory-structure/18.package.md | 5 +++-- .../2.guide/3.directory-structure/19.tsconfig.md | 9 ++++----- .../2.guide/3.directory-structure/2.output.md | 8 +++----- .../2.guide/3.directory-structure/3.assets.md | 9 +++------ .../2.guide/3.directory-structure/4.components.md | 9 ++++----- .../2.guide/3.directory-structure/6.layouts.md | 9 +++------ .../2.guide/3.directory-structure/7.middleware.md | 9 +++------ .../2.guide/3.directory-structure/9.node_modules.md | 7 +++---- docs/content/2.guide/3.directory-structure/index.md | 2 +- docs/content/2.guide/5.deploy/1.node-server.md | 7 ++++--- docs/content/2.guide/5.deploy/2.static-hosting.md | 4 +++- docs/content/2.guide/5.deploy/3.presets.md | 7 ++++--- docs/content/2.guide/5.deploy/index.md | 2 +- .../5.deploy/providers/{index.md => _dir.yml} | 2 -- docs/content/2.guide/5.deploy/providers/aws.md | 3 +-- docs/content/2.guide/5.deploy/providers/azure.md | 3 +-- .../content/2.guide/5.deploy/providers/cloudflare.md | 3 +-- .../2.guide/5.deploy/providers/digitalocean.md | 3 +-- docs/content/2.guide/5.deploy/providers/firebase.md | 3 +-- docs/content/2.guide/5.deploy/providers/heroku.md | 3 +-- docs/content/2.guide/5.deploy/providers/layer0.md | 3 +-- docs/content/2.guide/5.deploy/providers/netlify.md | 3 +-- docs/content/2.guide/5.deploy/providers/render.md | 3 +-- docs/content/2.guide/5.deploy/providers/stormkit.md | 3 +-- docs/content/2.guide/5.deploy/providers/vercel.md | 3 +-- docs/content/2.guide/6.going-further/1.internals.md | 7 ++++--- docs/content/2.guide/6.going-further/2.hooks.md | 7 +++++-- docs/content/2.guide/6.going-further/3.modules.md | 12 +++++++++--- docs/content/2.guide/6.going-further/4.kit.md | 5 ++++- docs/content/2.guide/6.going-further/5.esm.md | 7 ++++--- docs/content/2.guide/6.going-further/6.nuxt-app.md | 7 ++++--- docs/content/2.guide/6.going-further/7.testing.md | 5 ++++- .../2.guide/6.going-further/8.edge-channel.md | 3 ++- docs/content/2.guide/6.going-further/index.md | 2 +- docs/content/2.guide/index.md | 2 +- docs/content/3.api/1.composables/use-async-data.md | 7 ++++--- docs/content/3.api/1.composables/use-cookie.md | 7 ++++--- docs/content/3.api/1.composables/use-error.md | 7 ++++--- docs/content/3.api/1.composables/use-fetch.md | 9 +++++++-- docs/content/3.api/1.composables/use-head.md | 4 +++- .../3.api/1.composables/use-lazy-async-data.md | 4 +++- docs/content/3.api/1.composables/use-lazy-fetch.md | 4 +++- docs/content/3.api/1.composables/use-nuxt-app.md | 4 +++- .../content/3.api/1.composables/use-request-event.md | 7 ++++--- .../3.api/1.composables/use-request-headers.md | 7 ++++--- docs/content/3.api/1.composables/use-route.md | 4 +++- docs/content/3.api/1.composables/use-state.md | 4 +++- docs/content/3.api/2.components/1.nuxt-page.md | 4 +++- docs/content/3.api/2.components/2.nuxt-layout.md | 4 +++- .../3.api/2.components/5.nuxt-error-boundary.md | 4 +++- docs/content/3.api/2.components/index.md | 2 +- docs/content/3.api/3.utils/$fetch.md | 4 +++- docs/content/3.api/3.utils/abort-navigation.md | 4 +++- docs/content/3.api/3.utils/add-route-middleware.md | 4 +++- docs/content/3.api/3.utils/clear-error.md | 7 ++++--- docs/content/3.api/3.utils/define-nuxt-component.md | 4 +++- .../3.api/3.utils/define-nuxt-route-middleware.md | 4 +++- docs/content/3.api/3.utils/define-page-meta.md | 4 +++- docs/content/3.api/3.utils/index.md | 2 +- docs/content/3.api/3.utils/navigate-to.md | 4 +++- docs/content/3.api/3.utils/refresh-nuxt-data.md | 4 +++- docs/content/3.api/3.utils/throw-error.md | 7 ++++--- docs/content/3.api/4.advanced/1.hooks.md | 4 +++- docs/content/3.api/4.advanced/2.kit.md | 4 +++- docs/content/3.api/5.commands/add.md | 7 ++++--- docs/content/3.api/5.commands/analyze.md | 7 ++++--- docs/content/3.api/5.commands/build.md | 4 +++- docs/content/3.api/5.commands/dev.md | 4 +++- docs/content/3.api/5.commands/generate.md | 4 +++- docs/content/3.api/5.commands/info.md | 4 +++- docs/content/3.api/5.commands/init.md | 4 +++- docs/content/3.api/5.commands/preview.md | 4 +++- docs/content/3.api/5.commands/typecheck.md | 4 +++- docs/content/3.api/5.commands/upgrade.md | 4 +++- docs/content/3.api/index.md | 2 +- docs/content/4.examples/0.essentials/hello-world.md | 9 ++++----- docs/content/4.examples/1.app/error-handling.md | 9 ++++----- docs/content/4.examples/1.app/plugins.md | 9 ++++----- docs/content/4.examples/1.app/teleport.md | 9 ++++----- docs/content/4.examples/2.auto-imports/components.md | 8 ++++---- .../content/4.examples/2.auto-imports/composables.md | 8 ++++---- .../4.examples/3.composables/use-async-data.md | 9 ++++----- docs/content/4.examples/3.composables/use-cookie.md | 9 ++++----- docs/content/4.examples/3.composables/use-fetch.md | 9 ++++----- docs/content/4.examples/3.composables/use-head.md | 9 ++++----- docs/content/4.examples/3.composables/use-state.md | 9 +++++---- docs/content/4.examples/4.routing/layouts.md | 9 ++++----- docs/content/4.examples/4.routing/middleware.md | 9 ++++----- docs/content/4.examples/4.routing/nuxt-link.md | 9 ++++----- docs/content/4.examples/4.routing/pages.md | 9 ++++----- .../content/4.examples/4.routing/universal-router.md | 9 ++++----- docs/content/4.examples/5.server/routes.md | 9 ++++----- docs/content/4.examples/6.advanced/config-extends.md | 9 +++++---- .../4.examples/6.advanced/module-extend-pages.md | 9 ++++----- docs/content/4.examples/6.advanced/testing.md | 7 ++++--- .../7.experimental/reactivity-transform.md | 9 ++++----- docs/content/4.examples/7.experimental/wasm.md | 9 ++++----- docs/content/4.examples/8.other/locale.md | 7 ++----- docs/content/4.examples/index.md | 2 +- docs/content/5.community/1.getting-help.md | 9 +++++++-- docs/content/5.community/2.reporting-bugs.md | 9 +++++++-- docs/content/5.community/3.contribution.md | 7 ++++--- docs/content/5.community/4.roadmap.md | 7 +++++-- docs/content/5.community/index.md | 2 +- docs/content/6.bridge/1.overview.md | 5 ++--- docs/content/6.bridge/2.bridge-composition-api.md | 4 ++-- docs/content/6.bridge/_dir.yml | 1 - docs/content/7.migration/1.overview.md | 10 ++++------ docs/content/7.migration/10.bundling.md | 4 ++-- docs/content/7.migration/11.server.md | 4 ++-- docs/content/7.migration/2.configuration.md | 6 ++---- docs/content/7.migration/20.module-authors.md | 6 ++---- docs/content/7.migration/3.auto-imports.md | 9 +++------ docs/content/7.migration/4.meta.md | 9 +++------ docs/content/7.migration/5.plugins-and-middleware.md | 6 ++---- docs/content/7.migration/6.pages-and-layouts.md | 6 ++---- docs/content/7.migration/7.component-options.md | 6 ++---- docs/content/7.migration/8.runtime-config.md | 11 +++++------ 149 files changed, 469 insertions(+), 418 deletions(-) create mode 100644 docs/content/1.getting-started/_dir.yml rename docs/content/2.guide/5.deploy/providers/{index.md => _dir.yml} (69%) delete mode 100644 docs/content/6.bridge/_dir.yml diff --git a/docs/content/1.getting-started/2.migration.md b/docs/content/1.getting-started/2.migration.md index 347b92477d1..bb82f07f868 100644 --- a/docs/content/1.getting-started/2.migration.md +++ b/docs/content/1.getting-started/2.migration.md @@ -1,6 +1,7 @@ -# Migration Guide - -Already have a Nuxt project to migrate? These migration guides are for users wanting to upgrade their Nuxt application to Nuxt 3 or take the first step in that direction with Nuxt Bridge. +--- +title: "Migration Guide" +description: "Already have a Nuxt project to migrate? These migration guides are for users wanting to upgrade their Nuxt application to Nuxt 3 or take the first step in that direction with Nuxt Bridge." +--- - [**From Nuxt 2 to Nuxt 3**](/migration/overview) - [From Nuxt 2 to Nuxt Bridge](/bridge/overview) diff --git a/docs/content/1.getting-started/_dir.yml b/docs/content/1.getting-started/_dir.yml new file mode 100644 index 00000000000..95c565f6e01 --- /dev/null +++ b/docs/content/1.getting-started/_dir.yml @@ -0,0 +1 @@ +title: Get Started diff --git a/docs/content/1.getting-started/index.md b/docs/content/1.getting-started/index.md index ce7567d5750..8e11d485305 100644 --- a/docs/content/1.getting-started/index.md +++ b/docs/content/1.getting-started/index.md @@ -1,5 +1,4 @@ --- -title: Get Started navigation: false redirect: /getting-started/quick-start --- diff --git a/docs/content/2.guide/1.concepts/1.introduction.md b/docs/content/2.guide/1.concepts/1.introduction.md index 339763b2239..63be7ee32f8 100644 --- a/docs/content/2.guide/1.concepts/1.introduction.md +++ b/docs/content/2.guide/1.concepts/1.introduction.md @@ -1,6 +1,7 @@ -# What is Nuxt? - -Nuxt's goal is to make web development intuitive and performant with a great developer experience in mind. +--- +title: "What is Nuxt?" +description: "Nuxt's goal is to make web development intuitive and performant with a great developer experience in mind." +--- ## Why Nuxt? diff --git a/docs/content/2.guide/1.concepts/2.vuejs-development.md b/docs/content/2.guide/1.concepts/2.vuejs-development.md index fe85321f6d3..295aa004a80 100644 --- a/docs/content/2.guide/1.concepts/2.vuejs-development.md +++ b/docs/content/2.guide/1.concepts/2.vuejs-development.md @@ -1,6 +1,7 @@ -# Vue.js Development - -Nuxt uses Vue as a frontend framework and adds features such as component auto-imports and file-based routing. Nuxt 3 integrates Vue 3, the new major release of Vue that enables new patterns for Nuxt users. +--- +title: "Vue.js Development" +description: "Nuxt uses Vue as a frontend framework and adds features such as component auto-imports and file-based routing. Nuxt 3 integrates Vue 3, the new major release of Vue that enables new patterns for Nuxt users." +--- ## Vue.js diff --git a/docs/content/2.guide/1.concepts/3.rendering.md b/docs/content/2.guide/1.concepts/3.rendering.md index dc18da5eabc..90c66b663a0 100644 --- a/docs/content/2.guide/1.concepts/3.rendering.md +++ b/docs/content/2.guide/1.concepts/3.rendering.md @@ -1,6 +1,7 @@ -# Rendering Modes - -Both the browser and server can interpret JavaScript code to render Vue.js components into HTML elements. This step is called **rendering**. Nuxt supports both **client-side** and **universal** rendering. The two approaches have pros and cons that we will cover in this section. +--- +title: "Rendering Modes" +description: "Both the browser and server can interpret JavaScript code to render Vue.js components into HTML elements. This step is called **rendering**. Nuxt supports both **client-side** and **universal** rendering. The two approaches have pros and cons that we will cover in this section." +--- ## Client-side only rendering diff --git a/docs/content/2.guide/1.concepts/4.auto-imports.md b/docs/content/2.guide/1.concepts/4.auto-imports.md index a7baa2ba6e1..b7d574648f6 100644 --- a/docs/content/2.guide/1.concepts/4.auto-imports.md +++ b/docs/content/2.guide/1.concepts/4.auto-imports.md @@ -1,6 +1,7 @@ -# Auto Imports - -Nuxt auto-imports helper functions, composables and Vue APIs to use across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own components, composables and plugins. Components, composables or plugins can use these functions. +--- +title: "Auto Imports" +description: "Nuxt auto-imports helper functions, composables and Vue APIs to use across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own components, composables and plugins. Components, composables or plugins can use these functions." +--- Contrary to a classic global declaration, Nuxt preserves typings and IDEs completions and hints, and only includes what is actually used in your production code. diff --git a/docs/content/2.guide/1.concepts/4.server-engine.md b/docs/content/2.guide/1.concepts/4.server-engine.md index e32b24c390d..5db8e54acd5 100644 --- a/docs/content/2.guide/1.concepts/4.server-engine.md +++ b/docs/content/2.guide/1.concepts/4.server-engine.md @@ -1,8 +1,10 @@ -# Server Engine - -Nuxt 3 is powered by a new server engine, code-named "Nitro". +--- +title: "Server Engine" +description: "Nuxt 3 is powered by a new server engine, code-named \"Nitro\"." +--- This engine has many benefits: + ::list - Cross-platform support for Node.js, Browsers, service-workers and more. diff --git a/docs/content/2.guide/1.concepts/6.typescript.md b/docs/content/2.guide/1.concepts/6.typescript.md index 6d3a44b1550..8067fd0c2b4 100644 --- a/docs/content/2.guide/1.concepts/6.typescript.md +++ b/docs/content/2.guide/1.concepts/6.typescript.md @@ -1,6 +1,7 @@ -# TypeScript - -Nuxt 3 is fully typed and provides helpful shortcuts to ensure you have access to accurate type information when you are coding. +--- +title: "TypeScript" +description: "Nuxt 3 is fully typed and provides helpful shortcuts to ensure you have access to accurate type information when you are coding." +--- ## Type-checking diff --git a/docs/content/2.guide/1.concepts/index.md b/docs/content/2.guide/1.concepts/index.md index 0d24933b9a8..211206df93a 100644 --- a/docs/content/2.guide/1.concepts/index.md +++ b/docs/content/2.guide/1.concepts/index.md @@ -1,5 +1,5 @@ --- -title: Concepts +title: "Concepts" navigation: false redirect: /guide/concepts/introduction --- diff --git a/docs/content/2.guide/2.features/1.views.md b/docs/content/2.guide/2.features/1.views.md index 53bf6eb1386..7da4d29a2ac 100644 --- a/docs/content/2.guide/2.features/1.views.md +++ b/docs/content/2.guide/2.features/1.views.md @@ -1,4 +1,6 @@ -# Views +--- +title: "Views" +--- ::NeedContribution :: diff --git a/docs/content/2.guide/2.features/10.runtime-config.md b/docs/content/2.guide/2.features/10.runtime-config.md index e4c5269430f..543a002c905 100644 --- a/docs/content/2.guide/2.features/10.runtime-config.md +++ b/docs/content/2.guide/2.features/10.runtime-config.md @@ -1,6 +1,7 @@ -# Runtime Config - -Nuxt provides a runtime config API to expose config within your application and server routes with the ability to update them at runtime using environment variables. +--- +title: "Runtime Config" +description: "Nuxt provides a runtime config API to expose config within your application and server routes with the ability to update them at runtime using environment variables." +--- ## Exposing runtime config diff --git a/docs/content/2.guide/2.features/11.teleports.md b/docs/content/2.guide/2.features/11.teleports.md index b87705af581..1e8b6a6087a 100644 --- a/docs/content/2.guide/2.features/11.teleports.md +++ b/docs/content/2.guide/2.features/11.teleports.md @@ -1,8 +1,9 @@ -# Teleports +--- +title: "Teleports" +description: "Vue 3 provides the component which allows content to be rendered elsewhere in the DOM, outside of the Vue application." +--- -Vue 3 provides the [`` component](https://vuejs.org/guide/built-ins/teleport.html) which allows content to be rendered elsewhere in the DOM, outside of the Vue application. - -The `to` target of `` expects a CSS selector string or an actual DOM node. Nuxt currently has SSR support for teleports to `body` only, with client-side support for other targets using a `` wrapper. +The `to` target of [``](https://vuejs.org/guide/built-ins/teleport.html) expects a CSS selector string or an actual DOM node. Nuxt currently has SSR support for teleports to `body` only, with client-side support for other targets using a `` wrapper. ## Example: body teleport diff --git a/docs/content/2.guide/2.features/13.modules.md b/docs/content/2.guide/2.features/13.modules.md index 1cf34db022c..6e39bffa842 100644 --- a/docs/content/2.guide/2.features/13.modules.md +++ b/docs/content/2.guide/2.features/13.modules.md @@ -1,6 +1,9 @@ -# Modules +--- +title: "Modules" +description: "Nuxt provides a module system to extend the framework core and simplify integrations." +--- -Nuxt provides a module system to extend the framework core and simplify integrations. You don't need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using [`nuxt.config`](/api/configuration/nuxt.config#modules). +You don't need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using [`nuxt.config`](/api/configuration/nuxt.config#modules). ## Exploring Nuxt Modules diff --git a/docs/content/2.guide/2.features/2.routing.md b/docs/content/2.guide/2.features/2.routing.md index 6c8fbeddf45..24f27a3d5cc 100644 --- a/docs/content/2.guide/2.features/2.routing.md +++ b/docs/content/2.guide/2.features/2.routing.md @@ -1,4 +1,6 @@ -# Routing +--- +title: "Routing" +--- ::NeedContribution :: diff --git a/docs/content/2.guide/2.features/3.assets.md b/docs/content/2.guide/2.features/3.assets.md index 53a78ab0592..5f63b346d1c 100644 --- a/docs/content/2.guide/2.features/3.assets.md +++ b/docs/content/2.guide/2.features/3.assets.md @@ -1,6 +1,7 @@ -# Assets - -Nuxt uses two directories to handle assets like stylesheets, fonts or images: +--- +title: "Assets" +description: "Nuxt uses two directories to handle assets like stylesheets, fonts or images." +--- - The [`public/` directory](/guide/directory-structure/public) content is served at the server root as-is. - The [`assets/` directory](/guide/directory-structure/assets) contains by convention every asset that you want the build tool (Vite or Webpack) to process. diff --git a/docs/content/2.guide/2.features/4.head-management.md b/docs/content/2.guide/2.features/4.head-management.md index a8e23ff3a5e..6b65ad08657 100644 --- a/docs/content/2.guide/2.features/4.head-management.md +++ b/docs/content/2.guide/2.features/4.head-management.md @@ -1,6 +1,7 @@ -# Head Management - -Out-of-the-box, Nuxt provides good default values for `charset` and `viewport` meta tags, but you can override these if you need to, as well as customize other meta tags for your site in several different ways. +--- +title: "Head Management" +description: "Out-of-the-box, Nuxt provides good default values for charset and viewport meta tags, but you can override these if you need to, as well as customize other meta tags for your site in several different ways." +--- :ReadMore{link="/api/configuration/nuxt.config#head"} diff --git a/docs/content/2.guide/2.features/5.data-fetching.md b/docs/content/2.guide/2.features/5.data-fetching.md index 73de0a94ba6..2284e58ca23 100644 --- a/docs/content/2.guide/2.features/5.data-fetching.md +++ b/docs/content/2.guide/2.features/5.data-fetching.md @@ -1,6 +1,7 @@ -# Data Fetching - -Nuxt provides `useFetch`, `useLazyFetch`, `useAsyncData` and `useLazyAsyncData` to handle data fetching within your application. +--- +title: "Data Fetching" +description: "Nuxt provides useFetch, useLazyFetch, useAsyncData and useLazyAsyncData to handle data fetching within your application." +--- ::alert{icon=👉} **`useFetch`, `useLazyFetch`, `useAsyncData` and `useLazyAsyncData` only work during `setup` or `Lifecycle Hooks`** diff --git a/docs/content/2.guide/2.features/6.state-management.md b/docs/content/2.guide/2.features/6.state-management.md index 727064711ce..c942459facd 100644 --- a/docs/content/2.guide/2.features/6.state-management.md +++ b/docs/content/2.guide/2.features/6.state-management.md @@ -1,6 +1,7 @@ -# State Management - -Nuxt provides `useState` composable to create a reactive and SSR-friendly shared state across components. +--- +title: "State Management" +description: "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. diff --git a/docs/content/2.guide/2.features/7.error-handling.md b/docs/content/2.guide/2.features/7.error-handling.md index c65ed759f82..7bd5599b7c4 100644 --- a/docs/content/2.guide/2.features/7.error-handling.md +++ b/docs/content/2.guide/2.features/7.error-handling.md @@ -1,4 +1,6 @@ -# Error Handling +--- +title: "Error Handling" +--- ## Handling errors diff --git a/docs/content/2.guide/2.features/8.plugins.md b/docs/content/2.guide/2.features/8.plugins.md index 5841ab7f2f8..c4bfc1b65a9 100644 --- a/docs/content/2.guide/2.features/8.plugins.md +++ b/docs/content/2.guide/2.features/8.plugins.md @@ -1,4 +1,6 @@ -# Plugins +--- +title: "Plugins" +--- ::NeedContribution :: diff --git a/docs/content/2.guide/2.features/9.server-routes.md b/docs/content/2.guide/2.features/9.server-routes.md index fbecf165db8..9c11cea6c4f 100644 --- a/docs/content/2.guide/2.features/9.server-routes.md +++ b/docs/content/2.guide/2.features/9.server-routes.md @@ -1,6 +1,7 @@ -# Server Routes - -Nuxt automatically scans files inside the `~/server/api`, `~/server/routes`, and `~/server/middleware` directories to register API and server handlers with HMR support. +--- +title: "Server Routes" +description: "Nuxt automatically scans files inside the ~/server/api, ~/server/routes, and ~/server/middleware directories to register API and server handlers with HMR support." +--- Each file should export a default function defined with `defineEventHandler()`. diff --git a/docs/content/2.guide/2.features/index.md b/docs/content/2.guide/2.features/index.md index e761a95f232..322f72018e1 100644 --- a/docs/content/2.guide/2.features/index.md +++ b/docs/content/2.guide/2.features/index.md @@ -1,5 +1,5 @@ --- -title: Features +title: "Features" navigation: false redirect: /guide/features/views --- diff --git a/docs/content/2.guide/3.directory-structure/1.nuxt.md b/docs/content/2.guide/3.directory-structure/1.nuxt.md index 7b96e9a7137..9779b08affb 100644 --- a/docs/content/2.guide/3.directory-structure/1.nuxt.md +++ b/docs/content/2.guide/3.directory-structure/1.nuxt.md @@ -1,14 +1,10 @@ --- icon: IconDirectory -title: '.nuxt' -head.title: Nuxt directory +title: ".nuxt" +description: "Nuxt uses the .nuxt/ directory in development to generate your Vue application." +head.title: "Nuxt directory" --- - -# Nuxt directory - -Nuxt uses the `.nuxt/` directory in development to generate your Vue application. - ::alert{type=warning} You should not touch any files inside since the whole directory will be re-created when running `nuxt dev`. :: diff --git a/docs/content/2.guide/3.directory-structure/10.pages.md b/docs/content/2.guide/3.directory-structure/10.pages.md index 60781036c94..7cd2c6de9ea 100644 --- a/docs/content/2.guide/3.directory-structure/10.pages.md +++ b/docs/content/2.guide/3.directory-structure/10.pages.md @@ -1,13 +1,10 @@ --- icon: IconDirectory -title: 'pages' -head.title: Pages directory +title: "page" +description: "Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood." +head.title: "Pages directory" --- -# 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](/guide/directory-structure/app), reducing your application's bundle size. :: diff --git a/docs/content/2.guide/3.directory-structure/11.plugins.md b/docs/content/2.guide/3.directory-structure/11.plugins.md index 9ad1a449c81..6a940a04a7f 100644 --- a/docs/content/2.guide/3.directory-structure/11.plugins.md +++ b/docs/content/2.guide/3.directory-structure/11.plugins.md @@ -1,12 +1,11 @@ --- icon: IconDirectory -title: 'plugins' -head.title: Plugins directory +title: "plugins" +description: "Nuxt will automatically read the files in your plugins directory and load them." +head.title: "Plugins directory" --- -# Plugins directory - -Nuxt will automatically read the files in your `plugins` directory and load them. You can use `.server` or `.client` suffix in the file name to load a plugin only on the server or client side. +You can use `.server` or `.client` suffix in the file name to load a plugin only on the server or client side. ::alert{type=warning} All plugins in your `plugins/` directory are auto-registered, so you should not add them to your `nuxt.config` separately. diff --git a/docs/content/2.guide/3.directory-structure/12.public.md b/docs/content/2.guide/3.directory-structure/12.public.md index ec17ed286a2..2313d99d25c 100644 --- a/docs/content/2.guide/3.directory-structure/12.public.md +++ b/docs/content/2.guide/3.directory-structure/12.public.md @@ -1,11 +1,10 @@ --- icon: IconDirectory -title: public -head.title: Public directory +title: "public" +description: "The public/ directory is used to serve your website's assets." +head.title: "Public directory" --- -# Public directory - The `public/` directory is directly served at the server root and contains public files that have to keep their names (e.g. `robots.txt`) _or_ likely won't change (e.g. `favicon.ico`). ::alert{icon=💡} diff --git a/docs/content/2.guide/3.directory-structure/13.server.md b/docs/content/2.guide/3.directory-structure/13.server.md index d442f079b2e..05527c290e1 100644 --- a/docs/content/2.guide/3.directory-structure/13.server.md +++ b/docs/content/2.guide/3.directory-structure/13.server.md @@ -1,9 +1,7 @@ --- icon: IconDirectory -title: server -head.title: Server directory +title: "server" +head.title: "Server directory" --- -# Server directory - ::ReadMore{link="/guide/features/server-routes"} diff --git a/docs/content/2.guide/3.directory-structure/14.gitignore.md b/docs/content/2.guide/3.directory-structure/14.gitignore.md index 84f1cbb1892..c2c13bb7820 100644 --- a/docs/content/2.guide/3.directory-structure/14.gitignore.md +++ b/docs/content/2.guide/3.directory-structure/14.gitignore.md @@ -1,12 +1,11 @@ --- icon: IconFile -title: .gitignore -head.title: Gitignore file +title: ".gitignore" +description: "A .gitignore file specifies intentionally untracked files that git should ignore." +head.title: "Gitignore file" --- -# Gitignore file - -A `.gitignore` file specifies intentionally untracked files that git should ignore. Learn more about it in [the git documentation](https://git-scm.com/docs/gitignore). +Learn more about it in [the git documentation](https://git-scm.com/docs/gitignore). We recommend having a `.gitignore` file that has **at least** the following entries present: diff --git a/docs/content/2.guide/3.directory-structure/15.app.md b/docs/content/2.guide/3.directory-structure/15.app.md index c525ba5d237..8dc4005a7d7 100644 --- a/docs/content/2.guide/3.directory-structure/15.app.md +++ b/docs/content/2.guide/3.directory-structure/15.app.md @@ -1,13 +1,10 @@ --- icon: IconFile -title: app.vue -head.title: App file +title: "app.vue" +description: "The app.vue file is the main component in your Nuxt 3 applications." +head.title: "App file" --- -# App file - -The `app.vue` file is the main component in your Nuxt 3 applications. - ## Minimal usage 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. 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 index 575d664c333..a348ed08ab8 100644 --- a/docs/content/2.guide/3.directory-structure/18.nuxt-config.md +++ b/docs/content/2.guide/3.directory-structure/18.nuxt-config.md @@ -1,12 +1,11 @@ --- icon: IconFile -title: nuxt.config.ts -head.title: Nuxt configuration file +title: "nuxt.config.ts" +description: "Nuxt can be easily configured with a single nuxt.config file." +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. +The file can have either a `.js`, `.ts` or `.mjs` extension. ```ts import { defineNuxtConfig } from 'nuxt' diff --git a/docs/content/2.guide/3.directory-structure/18.package.md b/docs/content/2.guide/3.directory-structure/18.package.md index e3331005d08..eea083c7214 100644 --- a/docs/content/2.guide/3.directory-structure/18.package.md +++ b/docs/content/2.guide/3.directory-structure/18.package.md @@ -1,7 +1,8 @@ --- icon: IconFile -title: package.json -head.title: Package file +title: "package.json" +description: "package.json file contains data about your Nuxt project dependencies." +head.title: "Package file" --- # Package file diff --git a/docs/content/2.guide/3.directory-structure/19.tsconfig.md b/docs/content/2.guide/3.directory-structure/19.tsconfig.md index 0b23aee372b..7ff3536178c 100644 --- a/docs/content/2.guide/3.directory-structure/19.tsconfig.md +++ b/docs/content/2.guide/3.directory-structure/19.tsconfig.md @@ -1,12 +1,11 @@ --- icon: IconFile -title: tsconfig.json -head.title: TypeScript configuration file +title: "tsconfig.json" +description: "Nuxt automatically generates a .nuxt/tsconfig.json file with the resolved aliases you are using in your Nuxt project, as well as with other sensible defaults." +head.title: "TypeScript configuration file" --- -# TypeScript configuration file - -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: +You can benefit from this by creating a [`tsconfig.json`](/guide/concepts/typescript) in the root of your project with the following content: ```json { diff --git a/docs/content/2.guide/3.directory-structure/2.output.md b/docs/content/2.guide/3.directory-structure/2.output.md index ec59e4ae1d8..72bbceacd01 100644 --- a/docs/content/2.guide/3.directory-structure/2.output.md +++ b/docs/content/2.guide/3.directory-structure/2.output.md @@ -1,12 +1,10 @@ --- icon: IconDirectory -title: '.output' -head.title: Output directory +title: ".output" +description: "Nuxt creates the .output/ directory when building your application for production." +head.title: "Output directory" --- -# Output directory - -Nuxt creates the `.output/` directory when building your application for production. ::alert{type=warning} You should not touch any files inside since the whole directory will be re-created when running `nuxt build`. diff --git a/docs/content/2.guide/3.directory-structure/3.assets.md b/docs/content/2.guide/3.directory-structure/3.assets.md index 95289dcf70b..f270d9cb149 100644 --- a/docs/content/2.guide/3.directory-structure/3.assets.md +++ b/docs/content/2.guide/3.directory-structure/3.assets.md @@ -1,13 +1,10 @@ --- icon: IconDirectory -title: 'assets' -head.title: Assets directory +title: "assets" +description: "The assets/ directory is used to add all the website's assets that the build tool (webpack or Vite) will process." +head.title: "Assets directory" --- -# Assets directory - -The `assets/` directory is used to add all the website's assets that the build tool (webpack or Vite) will process. - The directory usually contains the following types of files: - Stylesheets (CSS, SASS, etc.) diff --git a/docs/content/2.guide/3.directory-structure/4.components.md b/docs/content/2.guide/3.directory-structure/4.components.md index 7c825a10d99..8e0acfb4f10 100644 --- a/docs/content/2.guide/3.directory-structure/4.components.md +++ b/docs/content/2.guide/3.directory-structure/4.components.md @@ -1,12 +1,11 @@ --- icon: IconDirectory -title: 'components' -head.title: Components directory +title: "components" +description: "The components/ directory is where you put all your Vue components." +head.title: "Components directory" --- -# Components directory - -The `components/` directory is where you put all your Vue components which can then be imported inside your pages or other components ([learn more](https://vuejs.org/guide/essentials/component-basics.html#components-basics)). +It can then be imported inside any pages or other components ([learn more](https://vuejs.org/guide/essentials/component-basics.html#components-basics)). Nuxt automatically imports any components in your `components/` directory (along with components that are registered by any modules you may be using). diff --git a/docs/content/2.guide/3.directory-structure/6.layouts.md b/docs/content/2.guide/3.directory-structure/6.layouts.md index f1e393f185d..70fbc0c7bb2 100644 --- a/docs/content/2.guide/3.directory-structure/6.layouts.md +++ b/docs/content/2.guide/3.directory-structure/6.layouts.md @@ -1,13 +1,10 @@ --- icon: IconDirectory -title: 'layouts' -head.title: Layouts directory +title: "layouts" +description: "Nuxt provides a customizable layouts framework you can use throughout your application, ideal for extracting common UI or code patterns into reusable layout components." +head.title: "Layouts directory" --- -# Layouts directory - -Nuxt provides a customizable layouts framework you can use throughout your application, ideal for extracting common UI or code patterns into reusable layout components. - 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. (**Note**: The layout name is normalized to kebab-case, so `someLayout` becomes `some-layout`.) If you only have a single layout in your application, we recommend using [app.vue](/guide/directory-structure/app) instead. diff --git a/docs/content/2.guide/3.directory-structure/7.middleware.md b/docs/content/2.guide/3.directory-structure/7.middleware.md index 8f90cf9a21d..7156361a51b 100644 --- a/docs/content/2.guide/3.directory-structure/7.middleware.md +++ b/docs/content/2.guide/3.directory-structure/7.middleware.md @@ -1,13 +1,10 @@ --- icon: IconDirectory -title: 'middleware' -head.title: Middleware directory +title: "middleware" +description: "Nuxt provides a customizable route middleware framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route." +head.title: "Middleware directory" --- -# Middleware directory - -Nuxt provides a customizable **route middleware** framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route. - ::alert{type=info} Route middleware run within the Vue part of your Nuxt app. Despite the similar name, they are completely different from server middleware, which are run in the Nitro server part of your app. :: diff --git a/docs/content/2.guide/3.directory-structure/9.node_modules.md b/docs/content/2.guide/3.directory-structure/9.node_modules.md index edbd9a491b7..cdd0f4ba9b8 100644 --- a/docs/content/2.guide/3.directory-structure/9.node_modules.md +++ b/docs/content/2.guide/3.directory-structure/9.node_modules.md @@ -1,9 +1,8 @@ --- icon: IconDirectory -title: 'node_modules' -head.title: Node modules directory +title: "node_modules" +decription: "The node_modules/ directory is used to add all the dependencies that the build tool (webpack or Vite) will process." +head.title: "Node modules directory" --- -# Node modules directory - The package manager ([`npm`](https://docs.npmjs.com/cli/v7/commands/npm) or [`yarn`](https://yarnpkg.com/) or [`pnpm`](https://pnpm.io/cli/install)) creates the `node_modules` directory to store the dependencies of your project. diff --git a/docs/content/2.guide/3.directory-structure/index.md b/docs/content/2.guide/3.directory-structure/index.md index 84b02b5d1c3..35dc6f445e5 100644 --- a/docs/content/2.guide/3.directory-structure/index.md +++ b/docs/content/2.guide/3.directory-structure/index.md @@ -1,5 +1,5 @@ --- -title: 'Directory structure' +title: "Directory structure" navigation: false redirect: /guide/directory-structure/nuxt --- diff --git a/docs/content/2.guide/5.deploy/1.node-server.md b/docs/content/2.guide/5.deploy/1.node-server.md index cc189ae14d0..d14796107d0 100644 --- a/docs/content/2.guide/5.deploy/1.node-server.md +++ b/docs/content/2.guide/5.deploy/1.node-server.md @@ -1,6 +1,7 @@ -# Node.js Server - -Discover the Node.js server preset with Nitro to deploy on any Node hosting. +--- +title: "Node.js Server" +description: "Discover the Node.js server preset with Nitro to deploy on any Node hosting." +--- ::list diff --git a/docs/content/2.guide/5.deploy/2.static-hosting.md b/docs/content/2.guide/5.deploy/2.static-hosting.md index 86ce8e1b180..787503c06e8 100644 --- a/docs/content/2.guide/5.deploy/2.static-hosting.md +++ b/docs/content/2.guide/5.deploy/2.static-hosting.md @@ -1,4 +1,6 @@ -# Static Hosting +--- +title: "Static Hosting" +--- ::alert{type=warning icon=🚧} This feature is still experimental and under development for Nuxt 3. [Full static](https://nuxtjs.org/announcements/going-full-static) is not yet implemented but will be in a near future. diff --git a/docs/content/2.guide/5.deploy/3.presets.md b/docs/content/2.guide/5.deploy/3.presets.md index 489d8f3b509..3159f8c0941 100644 --- a/docs/content/2.guide/5.deploy/3.presets.md +++ b/docs/content/2.guide/5.deploy/3.presets.md @@ -1,6 +1,7 @@ -# Deployment Presets - -In addition to Node.js servers and static hosting services, a Nuxt 3 project can be deployed with several well-tested presets and minimal amount of configuration. +--- +title: "Deployment Presets" +description: "In addition to Node.js servers and static hosting services, a Nuxt 3 project can be deployed with several well-tested presets and minimal amount of configuration." +--- You can use the [Nuxt config](/guide/directory-structure/nuxt.config) to explicitly set the preset to use: diff --git a/docs/content/2.guide/5.deploy/index.md b/docs/content/2.guide/5.deploy/index.md index 3ad4166a87f..d79648d534a 100644 --- a/docs/content/2.guide/5.deploy/index.md +++ b/docs/content/2.guide/5.deploy/index.md @@ -1,4 +1,4 @@ --- -navigation: false +title: "Deploy" redirect: /guide/deploy/node-server --- diff --git a/docs/content/2.guide/5.deploy/providers/index.md b/docs/content/2.guide/5.deploy/providers/_dir.yml similarity index 69% rename from docs/content/2.guide/5.deploy/providers/index.md rename to docs/content/2.guide/5.deploy/providers/_dir.yml index dc762ec9a6c..9a286def087 100644 --- a/docs/content/2.guide/5.deploy/providers/index.md +++ b/docs/content/2.guide/5.deploy/providers/_dir.yml @@ -1,3 +1 @@ ---- navigation: false ---- diff --git a/docs/content/2.guide/5.deploy/providers/aws.md b/docs/content/2.guide/5.deploy/providers/aws.md index 747863fb411..f5744f295ef 100644 --- a/docs/content/2.guide/5.deploy/providers/aws.md +++ b/docs/content/2.guide/5.deploy/providers/aws.md @@ -1,9 +1,8 @@ --- icon: IconCloud +title: "AWS" --- -# AWS - How to deploy Nuxt to [AWS Lambda](https://aws.amazon.com/lambda/) ## Learn more diff --git a/docs/content/2.guide/5.deploy/providers/azure.md b/docs/content/2.guide/5.deploy/providers/azure.md index 1e8e04f2283..a26134ff046 100644 --- a/docs/content/2.guide/5.deploy/providers/azure.md +++ b/docs/content/2.guide/5.deploy/providers/azure.md @@ -1,9 +1,8 @@ --- icon: LogoAzure +title: "Azure" --- -# Azure - How to deploy to [Azure Static Web Apps](https://azure.microsoft.com/en-us/services/app-service/static/) or [Azure Functions](https://azure.microsoft.com/en-us/services/functions). ::list diff --git a/docs/content/2.guide/5.deploy/providers/cloudflare.md b/docs/content/2.guide/5.deploy/providers/cloudflare.md index 16bf8c37b78..cae66154342 100644 --- a/docs/content/2.guide/5.deploy/providers/cloudflare.md +++ b/docs/content/2.guide/5.deploy/providers/cloudflare.md @@ -1,9 +1,8 @@ --- icon: LogoCloudFlare +title: "Cloudflare Workers" --- -# Cloudflare Workers - How to deploy Nuxt to [Cloudflare Workers](https://workers.cloudflare.com/). ::list diff --git a/docs/content/2.guide/5.deploy/providers/digitalocean.md b/docs/content/2.guide/5.deploy/providers/digitalocean.md index d8e658c89a1..befa67c8515 100644 --- a/docs/content/2.guide/5.deploy/providers/digitalocean.md +++ b/docs/content/2.guide/5.deploy/providers/digitalocean.md @@ -1,9 +1,8 @@ --- icon: IconCloud +title: "DigitalOcean" --- -# DigitalOcean - Nitro supports deploying on the [Digital Ocean App Platform](https://docs.digitalocean.com/products/app-platform/) with minimal configuration. ## Learn more diff --git a/docs/content/2.guide/5.deploy/providers/firebase.md b/docs/content/2.guide/5.deploy/providers/firebase.md index cb89045c866..2ce2e11cc23 100644 --- a/docs/content/2.guide/5.deploy/providers/firebase.md +++ b/docs/content/2.guide/5.deploy/providers/firebase.md @@ -1,9 +1,8 @@ --- icon: LogoFirebase +title: "Firebase Hosting" --- -# Firebase Hosting - How to deploy Nuxt to [Firebase Hosting](https://firebase.google.com/docs/hosting). Nitro supports [Firebase Hosting](https://firebase.google.com/docs/hosting) with Cloud Functions out of the box. diff --git a/docs/content/2.guide/5.deploy/providers/heroku.md b/docs/content/2.guide/5.deploy/providers/heroku.md index f422bde490a..0484c87b3ec 100644 --- a/docs/content/2.guide/5.deploy/providers/heroku.md +++ b/docs/content/2.guide/5.deploy/providers/heroku.md @@ -1,9 +1,8 @@ --- icon: IconCloud +title: "Heroku" --- -# Heroku - How to deploy Nuxt to [Heroku](https://www.heroku.com/). ## Learn more diff --git a/docs/content/2.guide/5.deploy/providers/layer0.md b/docs/content/2.guide/5.deploy/providers/layer0.md index b8f0fd6e588..fe56fa91ae2 100644 --- a/docs/content/2.guide/5.deploy/providers/layer0.md +++ b/docs/content/2.guide/5.deploy/providers/layer0.md @@ -1,9 +1,8 @@ --- icon: IconCloud +title: "Layer0" --- -# Layer0 - Nitro provides a built-in preset to generate output format compatible with [Layer0](https://www.layer0.co/). Layer0 extends the capabilities of a traditional CDN by not only hosting your static content, but also providing server-side rendering for progressive web applications as well as caching both your APIs and HTML at the network edge to provide your users with the fastest browsing experience. diff --git a/docs/content/2.guide/5.deploy/providers/netlify.md b/docs/content/2.guide/5.deploy/providers/netlify.md index f4cb565ab9f..c5fe4674ced 100644 --- a/docs/content/2.guide/5.deploy/providers/netlify.md +++ b/docs/content/2.guide/5.deploy/providers/netlify.md @@ -1,9 +1,8 @@ --- icon: LogoNetlify +title: "Netlify" --- -# Netlify - How to deploy Nuxt to [Netlify](https://www.netlify.com/). ::list diff --git a/docs/content/2.guide/5.deploy/providers/render.md b/docs/content/2.guide/5.deploy/providers/render.md index 4da7a28c80f..872194e9111 100644 --- a/docs/content/2.guide/5.deploy/providers/render.md +++ b/docs/content/2.guide/5.deploy/providers/render.md @@ -1,9 +1,8 @@ --- icon: IconCloud +title: "Render" --- -# Render - How to deploy Nuxt to [Render](https://render.com/) ## Learn more diff --git a/docs/content/2.guide/5.deploy/providers/stormkit.md b/docs/content/2.guide/5.deploy/providers/stormkit.md index 942f91757ce..a0830d0af8a 100644 --- a/docs/content/2.guide/5.deploy/providers/stormkit.md +++ b/docs/content/2.guide/5.deploy/providers/stormkit.md @@ -1,9 +1,8 @@ --- icon: IconCloud +title: "StormKit" --- -# StormKit - How to deploy Nuxt to [StormKit](https://www.stormkit.io/). ## Learn more diff --git a/docs/content/2.guide/5.deploy/providers/vercel.md b/docs/content/2.guide/5.deploy/providers/vercel.md index b3f21e2793b..9e5b1c2f266 100644 --- a/docs/content/2.guide/5.deploy/providers/vercel.md +++ b/docs/content/2.guide/5.deploy/providers/vercel.md @@ -1,9 +1,8 @@ --- icon: LogoVercel +title: "Vercel" --- -# Vercel - Nuxt on Vercel supports server-rendered pages and API routes. ::list diff --git a/docs/content/2.guide/6.going-further/1.internals.md b/docs/content/2.guide/6.going-further/1.internals.md index 2c1bdaf5b35..5f6be3b28c0 100644 --- a/docs/content/2.guide/6.going-further/1.internals.md +++ b/docs/content/2.guide/6.going-further/1.internals.md @@ -1,6 +1,7 @@ -# 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. +--- +title: "How Nuxt Works?" +description: "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." +--- ## The Nuxt interface diff --git a/docs/content/2.guide/6.going-further/2.hooks.md b/docs/content/2.guide/6.going-further/2.hooks.md index c6781d5e3ad..293094d5230 100644 --- a/docs/content/2.guide/6.going-further/2.hooks.md +++ b/docs/content/2.guide/6.going-further/2.hooks.md @@ -1,6 +1,9 @@ -# Lifecycle Hooks +--- +title: "Lifecycle Hooks" +description: "Nuxt provides a powerful hooking system to expand almost every aspect using hooks." +--- -Nuxt provides a powerful hooking system to expand almost every aspect using hooks powered by [unjs/hookable](https://github.com/unjs/hookable). +This feature is powered by [unjs/hookable](https://github.com/unjs/hookable). ## Nuxt Hooks (build time) diff --git a/docs/content/2.guide/6.going-further/3.modules.md b/docs/content/2.guide/6.going-further/3.modules.md index bffc29fdc5e..015a6508175 100644 --- a/docs/content/2.guide/6.going-further/3.modules.md +++ b/docs/content/2.guide/6.going-further/3.modules.md @@ -1,10 +1,16 @@ -# Module Author Guide +--- +title: "Module Author Guide" +description: "Nuxt provides a zero-config experience with a preset of integrations and best practices to develop Web applications." +--- -Nuxt provides a zero-config experience with a preset of integrations and best practices to develop Web applications. -A powerful configuration and hooks system makes it possible to customize almost every aspect of Nuxt Framework and add endless possible integrations when it comes to customization. You can learn more about how nuxt works in the [Nuxt internals](/guide/going-further/internals) section. +A powerful configuration and hooks system makes it possible to customize almost every aspect of Nuxt Framework and add endless possible integrations when it comes to customization. + +You can learn more about how nuxt works in the [Nuxt internals](/guide/going-further/internals) section. Nuxt exposes a powerful API called **Nuxt Modules**. Nuxt modules are simple async functions that sequentially run when starting nuxt in development mode using `nuxi dev` or building a project for production with `nuxi build`. + Using Nuxt Modules, we can encapsulate, properly test and share custom solutions as npm packages without adding unnecessary boilerplate to the Nuxt project itself. + Nuxt Modules can hook into lifecycle events of Nuxt builder, provide runtime app templates, update the configuration or do any other custom action based on needs. ## Quick Start diff --git a/docs/content/2.guide/6.going-further/4.kit.md b/docs/content/2.guide/6.going-further/4.kit.md index 58523140f70..27d074e1c37 100644 --- a/docs/content/2.guide/6.going-further/4.kit.md +++ b/docs/content/2.guide/6.going-further/4.kit.md @@ -1,4 +1,7 @@ -# Nuxt Kit +--- +title: "Nuxt Kit" +description: "@nuxt/kit provides features for module authors." +--- > Nuxt Kit provides composable utilities to make interacting with [Nuxt Hooks](/api/advanced/hooks) and [Nuxt Builder Core](/guide/going-further/internals#the-nuxt-interface) and developing [Nuxt Modules](/guide/going-further/modules) super easy! diff --git a/docs/content/2.guide/6.going-further/5.esm.md b/docs/content/2.guide/6.going-further/5.esm.md index 2aa42d50d4e..3ee38037c19 100644 --- a/docs/content/2.guide/6.going-further/5.esm.md +++ b/docs/content/2.guide/6.going-further/5.esm.md @@ -1,6 +1,7 @@ -# ES Modules - -Nuxt 3 (and Bridge) uses Native ES Modules. +--- +title: "ES Modules" +description: "Nuxt 3 (and Bridge) uses Native ES Modules." +--- This guide helps explain what ES Modules are and how to make a Nuxt app (or upstream library) compatible with ESM. diff --git a/docs/content/2.guide/6.going-further/6.nuxt-app.md b/docs/content/2.guide/6.going-further/6.nuxt-app.md index cfab81294c5..a912310a0be 100644 --- a/docs/content/2.guide/6.going-further/6.nuxt-app.md +++ b/docs/content/2.guide/6.going-further/6.nuxt-app.md @@ -1,6 +1,7 @@ -# NuxtApp - -In Nuxt 3, you can access runtime app context within composables, components and plugins. +--- +title: "NuxtApp" +description: "In Nuxt 3, you can access runtime app context within composables, components and plugins." +--- In Nuxt 2, this was referred to as [Nuxt context](https://nuxtjs.org/docs/internals-glossary/context#the-context). diff --git a/docs/content/2.guide/6.going-further/7.testing.md b/docs/content/2.guide/6.going-further/7.testing.md index bfcc9ad876d..f521637e631 100644 --- a/docs/content/2.guide/6.going-further/7.testing.md +++ b/docs/content/2.guide/6.going-further/7.testing.md @@ -1,4 +1,7 @@ -# Testing +--- +title: "Testing" +description: "How to test your Nuxt application." +--- ::alert{icon=👉} Test utils are still in development and the API and behavior may change. Currently, it's for module authors to preview but not yet ready for testing production apps. diff --git a/docs/content/2.guide/6.going-further/8.edge-channel.md b/docs/content/2.guide/6.going-further/8.edge-channel.md index f3e148b7ad1..042ab229696 100644 --- a/docs/content/2.guide/6.going-further/8.edge-channel.md +++ b/docs/content/2.guide/6.going-further/8.edge-channel.md @@ -1,5 +1,6 @@ --- -title: Edge Channel +title: "Edge Channel" +description: "Edge channel allows to use latest commits from the repository." --- # Edge Release Channel diff --git a/docs/content/2.guide/6.going-further/index.md b/docs/content/2.guide/6.going-further/index.md index b5d6614d043..6eeb56b5357 100644 --- a/docs/content/2.guide/6.going-further/index.md +++ b/docs/content/2.guide/6.going-further/index.md @@ -1,5 +1,5 @@ --- -title: Going further +title: "Going further" navigation: false redirect: /guide/going-further/tooling --- diff --git a/docs/content/2.guide/index.md b/docs/content/2.guide/index.md index f71d32b109a..fe6d59958c2 100644 --- a/docs/content/2.guide/index.md +++ b/docs/content/2.guide/index.md @@ -1,5 +1,5 @@ --- -title: Guide +title: "Guide" navigation: false redirect: /guide/concepts/introduction --- diff --git a/docs/content/3.api/1.composables/use-async-data.md b/docs/content/3.api/1.composables/use-async-data.md index 17806001ea0..89cab80f77d 100644 --- a/docs/content/3.api/1.composables/use-async-data.md +++ b/docs/content/3.api/1.composables/use-async-data.md @@ -1,6 +1,7 @@ -# `useAsyncData` - -Within your pages, components, and plugins you can use useAsyncData to get access to data that resolves asynchronously. +--- +title: "useAsyncData" +description: "Within your pages, components, and plugins you can use useAsyncData to get access to data that resolves asynchronously." +--- ## Type diff --git a/docs/content/3.api/1.composables/use-cookie.md b/docs/content/3.api/1.composables/use-cookie.md index c801238c967..9e290dfc0c0 100644 --- a/docs/content/3.api/1.composables/use-cookie.md +++ b/docs/content/3.api/1.composables/use-cookie.md @@ -1,6 +1,7 @@ -# `useCookie` - -Nuxt provides an SSR-friendly composable to read and write cookies. +--- +title: "useCookie" +description: "Nuxt provides an SSR-friendly composable to read and write cookies." +--- Within your pages, components and plugins you can use `useCookie` to create a reactive reference bound to a specific cookie. diff --git a/docs/content/3.api/1.composables/use-error.md b/docs/content/3.api/1.composables/use-error.md index 523428cf659..bd9b402005e 100644 --- a/docs/content/3.api/1.composables/use-error.md +++ b/docs/content/3.api/1.composables/use-error.md @@ -1,6 +1,7 @@ -# `useError` - -Nuxt provides a composable to catch global errors. +--- +title: "useError" +description: "Nuxt provides a composable to catch global errors." +--- This function will return the global Nuxt error that is being handled. diff --git a/docs/content/3.api/1.composables/use-fetch.md b/docs/content/3.api/1.composables/use-fetch.md index b1d42560667..ffc80fa4b70 100644 --- a/docs/content/3.api/1.composables/use-fetch.md +++ b/docs/content/3.api/1.composables/use-fetch.md @@ -1,6 +1,11 @@ -# `useFetch` +--- +title: "useFetch" +description: "A convenient wrapper around useAsyncData and $fetch." +--- -This composable provides a convenient wrapper around [`useAsyncData`](/api/composables/use-async-data) and [`$fetch`](/api/utils/$fetch). It automatically generates a key based on URL and fetch options, as well as infers API response type. +This composable provides a convenient wrapper around [`useAsyncData`](/api/composables/use-async-data) and [`$fetch`](/api/utils/$fetch). + +It automatically generates a key based on URL and fetch options, as well as infers API response type. ## Type diff --git a/docs/content/3.api/1.composables/use-head.md b/docs/content/3.api/1.composables/use-head.md index da557e33715..cf331d7fcc6 100644 --- a/docs/content/3.api/1.composables/use-head.md +++ b/docs/content/3.api/1.composables/use-head.md @@ -1,4 +1,6 @@ -# `useHead` +--- +title: "useHead" +--- ::ReadMore{link="/guide/features/head-management"} diff --git a/docs/content/3.api/1.composables/use-lazy-async-data.md b/docs/content/3.api/1.composables/use-lazy-async-data.md index 1d8b298777b..966e38372a2 100644 --- a/docs/content/3.api/1.composables/use-lazy-async-data.md +++ b/docs/content/3.api/1.composables/use-lazy-async-data.md @@ -1,4 +1,6 @@ -# `useLazyAsyncData` +--- +title: "useLazyAsyncData" +--- ## Description diff --git a/docs/content/3.api/1.composables/use-lazy-fetch.md b/docs/content/3.api/1.composables/use-lazy-fetch.md index df8c26252cb..facb1f597c1 100644 --- a/docs/content/3.api/1.composables/use-lazy-fetch.md +++ b/docs/content/3.api/1.composables/use-lazy-fetch.md @@ -1,4 +1,6 @@ -# `useLazyFetch` +--- +title: "useLazyFetch" +--- ## Description diff --git a/docs/content/3.api/1.composables/use-nuxt-app.md b/docs/content/3.api/1.composables/use-nuxt-app.md index a2f157397a7..97e0037073c 100644 --- a/docs/content/3.api/1.composables/use-nuxt-app.md +++ b/docs/content/3.api/1.composables/use-nuxt-app.md @@ -1,4 +1,6 @@ -# `useNuxtApp` +--- +title: "useNuxtApp" +--- ::NeedContribution :: diff --git a/docs/content/3.api/1.composables/use-request-event.md b/docs/content/3.api/1.composables/use-request-event.md index 881dfc8801d..04c5b54eaf1 100644 --- a/docs/content/3.api/1.composables/use-request-event.md +++ b/docs/content/3.api/1.composables/use-request-event.md @@ -1,6 +1,7 @@ -# `useRequestEvent` - -Nuxt provides composables and utilities for first-class server-side-rendering support. +--- +title: "useRequestEvent" +description: "Nuxt provides composables and utilities for first-class server-side-rendering support." +--- Within your pages, components, and plugins you can use `useRequestEvent` to access the incoming request. diff --git a/docs/content/3.api/1.composables/use-request-headers.md b/docs/content/3.api/1.composables/use-request-headers.md index 3c944bb44dc..04cb9eabcc7 100644 --- a/docs/content/3.api/1.composables/use-request-headers.md +++ b/docs/content/3.api/1.composables/use-request-headers.md @@ -1,6 +1,7 @@ -# `useRequestHeaders` - -Nuxt provides composables and utilities for first-class server-side-rendering support. +--- +title: "useRequestHeaders" +description: "Nuxt provides composables and utilities for first-class server-side-rendering support." +--- Within your pages, components, and plugins you can use `useRequestHeaders` to access the incoming request headers. diff --git a/docs/content/3.api/1.composables/use-route.md b/docs/content/3.api/1.composables/use-route.md index 719a67c341f..68a2360b12e 100644 --- a/docs/content/3.api/1.composables/use-route.md +++ b/docs/content/3.api/1.composables/use-route.md @@ -1,4 +1,6 @@ -# `useRoute` +--- +title: "useRoute" +--- The `useRoute` composable returns the current route and must be called in a `setup` function, plugin, or route middleware. diff --git a/docs/content/3.api/1.composables/use-state.md b/docs/content/3.api/1.composables/use-state.md index b6c46e48f32..35a0b919b41 100644 --- a/docs/content/3.api/1.composables/use-state.md +++ b/docs/content/3.api/1.composables/use-state.md @@ -1,4 +1,6 @@ -# `useState` +--- +title: "useState" +--- ```ts useState(key: string, init?: () => T | Ref): Ref diff --git a/docs/content/3.api/2.components/1.nuxt-page.md b/docs/content/3.api/2.components/1.nuxt-page.md index c37c558e228..81cce0c0a5b 100644 --- a/docs/content/3.api/2.components/1.nuxt-page.md +++ b/docs/content/3.api/2.components/1.nuxt-page.md @@ -1,4 +1,6 @@ -# `` +--- +title: "" +--- ::ReadMore{link="/guide/directory-structure/app"} :: diff --git a/docs/content/3.api/2.components/2.nuxt-layout.md b/docs/content/3.api/2.components/2.nuxt-layout.md index e32f5b6d00f..5c4b0e342b7 100644 --- a/docs/content/3.api/2.components/2.nuxt-layout.md +++ b/docs/content/3.api/2.components/2.nuxt-layout.md @@ -1,4 +1,6 @@ -# `` +--- +title: "" +--- ::ReadMore{link="/guide/directory-structure/app"} :: diff --git a/docs/content/3.api/2.components/5.nuxt-error-boundary.md b/docs/content/3.api/2.components/5.nuxt-error-boundary.md index 7cbe43de044..eea5cbfa845 100644 --- a/docs/content/3.api/2.components/5.nuxt-error-boundary.md +++ b/docs/content/3.api/2.components/5.nuxt-error-boundary.md @@ -1,4 +1,6 @@ -# `` +--- +title: "" +--- Nuxt provides the `` component to handle client-side errors happening in its default slot, using Vue's [`onErrorCaptured` hook.](https://vuejs.org/api/composition-api-lifecycle.html#onerrorcaptured) diff --git a/docs/content/3.api/2.components/index.md b/docs/content/3.api/2.components/index.md index 54f0552b0a6..b3ff4c1eefe 100644 --- a/docs/content/3.api/2.components/index.md +++ b/docs/content/3.api/2.components/index.md @@ -1,5 +1,5 @@ --- -title: Components +title: "Components" navigation: false redirect: /api/components/nuxt-page --- diff --git a/docs/content/3.api/3.utils/$fetch.md b/docs/content/3.api/3.utils/$fetch.md index 2db7045b249..f3ffa9e6a85 100644 --- a/docs/content/3.api/3.utils/$fetch.md +++ b/docs/content/3.api/3.utils/$fetch.md @@ -1,4 +1,6 @@ -# `$fetch` +--- +title: "$fetch" +--- ::ReadMore{link="/guide/features/data-fetching"} :: diff --git a/docs/content/3.api/3.utils/abort-navigation.md b/docs/content/3.api/3.utils/abort-navigation.md index 9271f599132..7d43a5a6fe8 100644 --- a/docs/content/3.api/3.utils/abort-navigation.md +++ b/docs/content/3.api/3.utils/abort-navigation.md @@ -1,4 +1,6 @@ -# `abortNavigation` +--- +title: "abortNavigation" +--- ```ts abortNavigation(err?: Error | string): false diff --git a/docs/content/3.api/3.utils/add-route-middleware.md b/docs/content/3.api/3.utils/add-route-middleware.md index 329ff9ace89..98054bf6b19 100644 --- a/docs/content/3.api/3.utils/add-route-middleware.md +++ b/docs/content/3.api/3.utils/add-route-middleware.md @@ -1,4 +1,6 @@ -# `addRouteMiddleware` +--- +title: "addRouteMiddleware" +--- ::ReadMore{link="/guide/features/routing"} :: diff --git a/docs/content/3.api/3.utils/clear-error.md b/docs/content/3.api/3.utils/clear-error.md index e92a716ecca..8b05d24c1f7 100644 --- a/docs/content/3.api/3.utils/clear-error.md +++ b/docs/content/3.api/3.utils/clear-error.md @@ -1,6 +1,7 @@ -# `clearError` - -Nuxt provides a composable to clear all handled errors. +--- +title: "clearError" +description: "Nuxt provides a composable to clear all handled errors." +--- Within your pages, components, and plugins, you can use `clearError` to clear all errors and redirect the user. diff --git a/docs/content/3.api/3.utils/define-nuxt-component.md b/docs/content/3.api/3.utils/define-nuxt-component.md index 1a718a0a6cf..c135e40d02d 100644 --- a/docs/content/3.api/3.utils/define-nuxt-component.md +++ b/docs/content/3.api/3.utils/define-nuxt-component.md @@ -1,4 +1,6 @@ -# `defineNuxtComponent` +--- +title: "defineNuxtComponent" +--- ::NeedContribution :: diff --git a/docs/content/3.api/3.utils/define-nuxt-route-middleware.md b/docs/content/3.api/3.utils/define-nuxt-route-middleware.md index a860c3ef4e0..f352a3d340e 100644 --- a/docs/content/3.api/3.utils/define-nuxt-route-middleware.md +++ b/docs/content/3.api/3.utils/define-nuxt-route-middleware.md @@ -1,4 +1,6 @@ -# `defineNuxtRouteMiddleware` +--- +title: "defineNuxtRouteMiddleware" +--- ::ReadMore{link="/guide/features/routing"} :: diff --git a/docs/content/3.api/3.utils/define-page-meta.md b/docs/content/3.api/3.utils/define-page-meta.md index f0649cc2b42..f7e3d6f11ce 100644 --- a/docs/content/3.api/3.utils/define-page-meta.md +++ b/docs/content/3.api/3.utils/define-page-meta.md @@ -1,4 +1,6 @@ -# `definePageMeta` +--- +title: "definePageMeta" +--- ::ReadMore{link="/guide/features/routing"} :: diff --git a/docs/content/3.api/3.utils/index.md b/docs/content/3.api/3.utils/index.md index a8d05099db1..a9369a314b1 100644 --- a/docs/content/3.api/3.utils/index.md +++ b/docs/content/3.api/3.utils/index.md @@ -1,5 +1,5 @@ --- -title: Utils +title: "Utils" navigation: false redirect: /api/utils/ --- diff --git a/docs/content/3.api/3.utils/navigate-to.md b/docs/content/3.api/3.utils/navigate-to.md index c65a8b8427c..4858d3a6047 100644 --- a/docs/content/3.api/3.utils/navigate-to.md +++ b/docs/content/3.api/3.utils/navigate-to.md @@ -1,4 +1,6 @@ -# `navigateTo` +--- +title: "navigateTo" +--- ::ReadMore{link="/guide/features/routing"} :: diff --git a/docs/content/3.api/3.utils/refresh-nuxt-data.md b/docs/content/3.api/3.utils/refresh-nuxt-data.md index 79afabf7635..1905d279d1c 100644 --- a/docs/content/3.api/3.utils/refresh-nuxt-data.md +++ b/docs/content/3.api/3.utils/refresh-nuxt-data.md @@ -1,4 +1,6 @@ -# `refreshNuxtData` +--- +title: "refreshNuxtData" +--- ::ReadMore{link="/guide/features/data-fetching"} :: diff --git a/docs/content/3.api/3.utils/throw-error.md b/docs/content/3.api/3.utils/throw-error.md index 7a9306def28..116a4681f39 100644 --- a/docs/content/3.api/3.utils/throw-error.md +++ b/docs/content/3.api/3.utils/throw-error.md @@ -1,6 +1,7 @@ -# `throwError` - -Nuxt provides a quick and simple way to throw errors. +--- +title: "throwError" +description: "Nuxt provides a quick and simple way to throw errors." +--- Within your pages, components and plugins you can use `throwError` to throw an error. diff --git a/docs/content/3.api/4.advanced/1.hooks.md b/docs/content/3.api/4.advanced/1.hooks.md index 7bf7b028836..4c5e70ae47e 100644 --- a/docs/content/3.api/4.advanced/1.hooks.md +++ b/docs/content/3.api/4.advanced/1.hooks.md @@ -1,4 +1,6 @@ -# Lifecycle Hooks +--- +title: "Lifecycle Hooks" +--- ::ReadMore{link="/guide/going-further/hooks"} :: diff --git a/docs/content/3.api/4.advanced/2.kit.md b/docs/content/3.api/4.advanced/2.kit.md index ad84419167c..38d5a58099f 100644 --- a/docs/content/3.api/4.advanced/2.kit.md +++ b/docs/content/3.api/4.advanced/2.kit.md @@ -1,4 +1,6 @@ -# Kit Utilities +--- +title: "Kit Utilities" +--- ::ReadMore{link="/guide/going-further/kit"} :: diff --git a/docs/content/3.api/5.commands/add.md b/docs/content/3.api/5.commands/add.md index 1bf1567c7b3..5ae988311a8 100644 --- a/docs/content/3.api/5.commands/add.md +++ b/docs/content/3.api/5.commands/add.md @@ -1,6 +1,7 @@ -# `nuxi add` - -Scaffold an entity into your Nuxt application. +--- +title: "nuxi add" +description: "Scaffold an entity into your Nuxt application." +--- ```{bash} npx nuxi add [--cwd] [--force]