From f4256a26dd03e31b5c26efc6bdbc1d1e9dd0acb9 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 7 Oct 2022 21:29:43 +0100 Subject: [PATCH] docs: fix more redirect issues --- docs/content/1.getting-started/2.installation.md | 2 +- docs/content/1.getting-started/4.assets.md | 2 +- docs/content/1.getting-started/5.seo-meta.md | 2 +- docs/content/1.getting-started/6.data-fetching.md | 2 +- docs/content/2.guide/1.concepts/1.auto-imports.md | 2 +- docs/content/2.guide/1.concepts/3.rendering.md | 2 +- docs/content/2.guide/1.concepts/5.modules.md | 2 +- docs/content/2.guide/1.concepts/8.typescript.md | 2 +- docs/content/2.guide/2.directory-structure/1.pages.md | 4 ++-- docs/content/3.api/1.composables/use-fetch.md | 2 +- docs/content/3.api/1.composables/use-head.md | 2 +- docs/content/3.api/3.utils/add-route-middleware.md | 2 +- .../3.api/3.utils/define-nuxt-route-middleware.md | 2 +- docs/content/3.api/3.utils/define-page-meta.md | 2 +- docs/content/3.api/3.utils/prefetch-components.md | 2 +- docs/content/3.api/5.commands/typecheck.md | 2 +- docs/content/4.examples/3.composables/use-head.md | 2 +- docs/content/5.community/4.framework-contribution.md | 4 ++-- docs/content/6.bridge/1.overview.md | 4 ++-- docs/content/6.bridge/2.bridge-composition-api.md | 2 +- docs/content/7.migration/1.overview.md | 2 +- docs/content/7.migration/4.meta.md | 6 +++--- docs/public/_redirects | 9 ++++++++- scripts/crawl.mjs | 2 +- 24 files changed, 36 insertions(+), 29 deletions(-) diff --git a/docs/content/1.getting-started/2.installation.md b/docs/content/1.getting-started/2.installation.md index 3bfe2f04730..6f55aaae649 100644 --- a/docs/content/1.getting-started/2.installation.md +++ b/docs/content/1.getting-started/2.installation.md @@ -107,4 +107,4 @@ Well done! A browser window should automatically open for ` is the recommended way of declaring Vue compone 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"} +::ReadMore{link="/api/utils/dollarfetch"} :: ### Example: Pass Client Headers to the API diff --git a/docs/content/2.guide/1.concepts/1.auto-imports.md b/docs/content/2.guide/1.concepts/1.auto-imports.md index 200439cc2f2..8409be01e8e 100644 --- a/docs/content/2.guide/1.concepts/1.auto-imports.md +++ b/docs/content/2.guide/1.concepts/1.auto-imports.md @@ -10,7 +10,7 @@ Contrary to a classic global declaration, Nuxt preserves typings and IDEs comple ::alert{type=info icon=💡} In the documentation, every function that is not explicitly imported is auto-imported by Nuxt and can be used as-is in your code. -You can find a reference for auto-imported [composables](/api/composables/use-async-data) and [utilities](/api/utils/$fetch) in the API section. +You can find a reference for auto-imported [composables](/api/composables/use-async-data) and [utilities](/api/utils/dollarfetch) in the API section. :: ::alert{type=warning} diff --git a/docs/content/2.guide/1.concepts/3.rendering.md b/docs/content/2.guide/1.concepts/3.rendering.md index 0fb415a6115..74baa3608d6 100644 --- a/docs/content/2.guide/1.concepts/3.rendering.md +++ b/docs/content/2.guide/1.concepts/3.rendering.md @@ -61,7 +61,7 @@ Universal rendering is very versatile and can fit almost any use case, and is es Client-side and universal rendering are different strategies to display an interface in a browser. -By default, Nuxt uses **universal rendering** to provide better user experience and performance, and to optimize search engine indexing, but you can switch rendering modes in [one line of configuration](/api/configuration/nuxt.config#ssr). +By default, Nuxt uses **universal rendering** to provide better user experience and performance, and to optimize search engine indexing, but you can switch rendering modes in [one line of configuration](/api/configuration/nuxt-config#ssr). ## Coming in Nuxt 3 diff --git a/docs/content/2.guide/1.concepts/5.modules.md b/docs/content/2.guide/1.concepts/5.modules.md index 80e0f0fceaf..65c82a7ff5e 100644 --- a/docs/content/2.guide/1.concepts/5.modules.md +++ b/docs/content/2.guide/1.concepts/5.modules.md @@ -4,7 +4,7 @@ description: "Nuxt provides a module system to extend the framework core and sim # Modules -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). +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). ## Exploring Nuxt Modules diff --git a/docs/content/2.guide/1.concepts/8.typescript.md b/docs/content/2.guide/1.concepts/8.typescript.md index 2a31ef5920a..0ae264170b6 100644 --- a/docs/content/2.guide/1.concepts/8.typescript.md +++ b/docs/content/2.guide/1.concepts/8.typescript.md @@ -8,7 +8,7 @@ Nuxt 3 is fully typed and provides helpful shortcuts to ensure you have access t ## Type-checking -By default, Nuxt doesn't check types when you run `nuxi dev` or `nuxi build`, for performance reasons. However, you can enable type-checking at build or development time by installing `vue-tsc` and `typescript` as devDependencies and either enabling [the `typescript.typeCheck` option in your `nuxt.config` file](/api/configuration/nuxt.config#typescript) or [manually checking your types with nuxi](/api/commands/typecheck). +By default, Nuxt doesn't check types when you run `nuxi dev` or `nuxi build`, for performance reasons. However, you can enable type-checking at build or development time by installing `vue-tsc` and `typescript` as devDependencies and either enabling [the `typescript.typeCheck` option in your `nuxt.config` file](/api/configuration/nuxt-config#typescript) or [manually checking your types with nuxi](/api/commands/typecheck). ```bash yarn nuxi typecheck diff --git a/docs/content/2.guide/2.directory-structure/1.pages.md b/docs/content/2.guide/2.directory-structure/1.pages.md index e45b01ce7c2..5be92592029 100644 --- a/docs/content/2.guide/2.directory-structure/1.pages.md +++ b/docs/content/2.guide/2.directory-structure/1.pages.md @@ -269,7 +269,7 @@ Of course, you are welcome to define metadata for your own use throughout your a Nuxt will automatically wrap your page in [the Vue `` component](https://vuejs.org/guide/built-ins/keep-alive.html#keepalive) if you set `keepalive: true` in your `definePageMeta`. This might be useful to do, for example, in a parent route that has dynamic child routes, if you want to preserve page state across route changes. You can also set props to be passed to `` (see a full list [here](https://vuejs.org/api/built-in-components.html#keepalive)). -You can set a default value for this property [in your `nuxt.config`](/api/configuration/nuxt.config#keepalive). +You can set a default value for this property [in your `nuxt.config`](/api/configuration/nuxt-config#keepalive). #### `key` @@ -287,7 +287,7 @@ You can define middleware to apply before loading this page. It will be merged w You can define transition properties for the `` component that wraps your pages and layouts, or pass `false` to disable the `` wrapper for that route. You can see a list of options that can be passed [here](https://vuejs.org/api/built-in-components.html#transition) or read [more about how transitions work](https://vuejs.org/guide/built-ins/transition.html#transition). -You can set default values for these properties [in your `nuxt.config`](/api/configuration/nuxt.config#layouttransition). +You can set default values for these properties [in your `nuxt.config`](/api/configuration/nuxt-config#layouttransition). #### `alias` diff --git a/docs/content/3.api/1.composables/use-fetch.md b/docs/content/3.api/1.composables/use-fetch.md index a5134fb7d64..8d5e296c5dc 100644 --- a/docs/content/3.api/1.composables/use-fetch.md +++ b/docs/content/3.api/1.composables/use-fetch.md @@ -1,6 +1,6 @@ # `useFetch` -This composable provides a convenient wrapper around [`useAsyncData`](/api/composables/use-async-data) and [`$fetch`](/api/utils/$fetch). +This composable provides a convenient wrapper around [`useAsyncData`](/api/composables/use-async-data) and [`$fetch`](/api/utils/dollarfetch). It automatically generates a key based on URL and fetch options, provides type hints for request url based on server routes, and infers API response type. diff --git a/docs/content/3.api/1.composables/use-head.md b/docs/content/3.api/1.composables/use-head.md index 11a2caa845d..f34b26f0f9f 100644 --- a/docs/content/3.api/1.composables/use-head.md +++ b/docs/content/3.api/1.composables/use-head.md @@ -30,7 +30,7 @@ interface MetaObject extends Record { } ``` -Application-wide configuration of the head metadata is possible through [nuxt.config](/api/configuration/nuxt.config#head), or by placing the `useHead` in the `app.vue` file. +Application-wide configuration of the head metadata is possible through [nuxt.config](/api/configuration/nuxt-config#head), or by placing the `useHead` in the `app.vue` file. ::alert{type=info} The properties of `useHead` can be dynamic, accepting `ref`, `computed` and `reactive` properties. `meta` parameter can also accept a function returning an object to make the entire object reactive. 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 c73697864e2..8836e2d9c6a 100644 --- a/docs/content/3.api/3.utils/add-route-middleware.md +++ b/docs/content/3.api/3.utils/add-route-middleware.md @@ -8,7 +8,7 @@ description: addRouteMiddleware() is a helper function to dynamically add middle `addRouteMiddleware()` is a helper function to dynamically add route middleware in your Nuxt application. ::alert{type=info} -Route middleware are navigation guards stored in the [`middleware/`](/guide/directory-structure/middleware) directory of your Nuxt application (unless [set otherwise](/api/configuration/nuxt.config#middleware)). +Route middleware are navigation guards stored in the [`middleware/`](/guide/directory-structure/middleware) directory of your Nuxt application (unless [set otherwise](/api/configuration/nuxt-config#middleware)). :: ## Usage 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 50a5b065a23..08f733c3251 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 @@ -6,7 +6,7 @@ title: "defineNuxtRouteMiddleware" Create named route middleware using `defineNuxtRouteMiddleware` helper function. -Route middleware are stored in the `middleware/` directory of your Nuxt application (unless [set otherwise](/api/configuration/nuxt.config#middleware)). +Route middleware are stored in the `middleware/` directory of your Nuxt application (unless [set otherwise](/api/configuration/nuxt-config#middleware)). ## Type 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 296fbaa1daf..ef4982ca763 100644 --- a/docs/content/3.api/3.utils/define-page-meta.md +++ b/docs/content/3.api/3.utils/define-page-meta.md @@ -4,7 +4,7 @@ title: "definePageMeta" # `definePageMeta` -`definePageMeta` is a compiler macro that you can use to set metadata for your **page** components located in the `pages/` directory (unless [set otherwise](https://v3.nuxtjs.org/api/configuration/nuxt.config#pages)). This way you can set custom metadata for each static or dynamic route of your Nuxt application. +`definePageMeta` is a compiler macro that you can use to set metadata for your **page** components located in the `pages/` directory (unless [set otherwise](https://v3.nuxtjs.org/api/configuration/nuxt-config#pages)). This way you can set custom metadata for each static or dynamic route of your Nuxt application. ```vue [pages/some-page.vue]