From a79762b0385e3e035327251098bf87e5e55aa598 Mon Sep 17 00:00:00 2001 From: Enkot Date: Mon, 1 May 2023 13:25:28 +0300 Subject: [PATCH 1/6] fix: fixes example code and comments --- .../composables/useCustomFetch.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts b/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts index 56365292b7b8..448035fcc2b9 100644 --- a/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts +++ b/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts @@ -15,12 +15,12 @@ export function useCustomFetch (url: string, options: UseFetchOptions = {} ? { Authorization: `Bearer ${userAuth.value}` } : {}, - onResponse (__ctx) { - // return new myBusinessResponse(response._data) + transform (_data) { + // return new myBusinessResponse(_data) }, onResponseError (__ctx) { - // return new myBusinessError(error) + // throw new myBusinessError() } } From 07ea8debe6860e7f9a42e65c56d803f22f964933 Mon Sep 17 00:00:00 2001 From: Enkot Date: Mon, 1 May 2023 14:10:07 +0300 Subject: [PATCH 2/6] fix: fixes onResponse examples --- docs/3.api/1.composables/use-fetch.md | 2 +- .../use-custom-fetch-composable/composables/useCustomFetch.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/3.api/1.composables/use-fetch.md b/docs/3.api/1.composables/use-fetch.md index 364ff36684c5..9541b15ad951 100644 --- a/docs/3.api/1.composables/use-fetch.md +++ b/docs/3.api/1.composables/use-fetch.md @@ -114,7 +114,7 @@ const { data, pending, error, refresh } = await useFetch('/api/auth/login', { }, onResponse({ request, response, options }) { // Process the response data - return response._data + localStorage.setItem('token', response._data.token) }, onResponseError({ request, response, options }) { // Handle the response errors diff --git a/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts b/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts index 448035fcc2b9..3662068450b9 100644 --- a/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts +++ b/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts @@ -15,8 +15,8 @@ export function useCustomFetch (url: string, options: UseFetchOptions = {} ? { Authorization: `Bearer ${userAuth.value}` } : {}, - transform (_data) { - // return new myBusinessResponse(_data) + onResponse ({ response }) { + // response._data = new myBusinessResponse(response._data) }, onResponseError (__ctx) { From 3c5efc3cde2de9b5bdb340280b59a0647f4c637d Mon Sep 17 00:00:00 2001 From: Enkot Date: Mon, 1 May 2023 14:44:32 +0300 Subject: [PATCH 3/6] fix: fixes linter errors --- .../use-custom-fetch-composable/composables/useCustomFetch.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts b/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts index 3662068450b9..097202ee820e 100644 --- a/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts +++ b/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts @@ -15,8 +15,8 @@ export function useCustomFetch (url: string, options: UseFetchOptions = {} ? { Authorization: `Bearer ${userAuth.value}` } : {}, - onResponse ({ response }) { - // response._data = new myBusinessResponse(response._data) + onResponse (_ctx) { + // _ctx.response._data = new myBusinessResponse(_ctx.response._data) }, onResponseError (__ctx) { From ce43cdce485b8c0b61ed7ec4e6a874a2e5243b12 Mon Sep 17 00:00:00 2001 From: Enkot Date: Mon, 1 May 2023 14:47:26 +0300 Subject: [PATCH 4/6] fix: cleanup --- .../use-custom-fetch-composable/composables/useCustomFetch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts b/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts index 097202ee820e..2464b3cd45ff 100644 --- a/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts +++ b/examples/other/use-custom-fetch-composable/composables/useCustomFetch.ts @@ -19,7 +19,7 @@ export function useCustomFetch (url: string, options: UseFetchOptions = {} // _ctx.response._data = new myBusinessResponse(_ctx.response._data) }, - onResponseError (__ctx) { + onResponseError (_ctx) { // throw new myBusinessError() } } From 4fa7bae6eb0204a93ec0ccf42e2053581608679c Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 11:57:19 +0000 Subject: [PATCH 5/6] [autofix.ci] apply automated fixes --- docs/1.getting-started/10.deployment.md | 2 +- docs/1.getting-started/2.installation.md | 6 +++--- docs/1.getting-started/9.layers.md | 2 +- docs/2.guide/1.concepts/2.vuejs-development.md | 4 ++-- docs/2.guide/2.directory-structure/1.components.md | 2 +- docs/2.guide/2.directory-structure/1.plugins.md | 2 +- docs/2.guide/2.directory-structure/1.server.md | 6 +++--- docs/3.api/1.composables/use-cookie.md | 2 +- docs/3.api/1.composables/use-nuxt-app.md | 2 +- docs/3.api/1.composables/use-route.md | 2 +- docs/3.api/1.composables/use-router.md | 6 +++--- docs/3.api/2.components/2.nuxt-page.md | 2 +- docs/3.api/2.components/4.nuxt-link.md | 8 ++++---- docs/3.api/2.components/5.nuxt-loading-indicator.md | 2 +- docs/3.api/2.components/7.nuxt-welcome.md | 2 +- docs/3.api/3.utils/on-before-route-leave.md | 2 +- docs/3.api/3.utils/on-before-route-update.md | 2 +- docs/3.api/5.commands/devtools.md | 2 +- docs/4.examples/6.advanced/jsx.md | 2 +- .../7.experimental/reactivity-transform.md | 2 +- docs/5.community/3.reporting-bugs.md | 12 ++++++------ 21 files changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/1.getting-started/10.deployment.md b/docs/1.getting-started/10.deployment.md index da1aeb93bda1..b9b607b4ed49 100644 --- a/docs/1.getting-started/10.deployment.md +++ b/docs/1.getting-started/10.deployment.md @@ -70,7 +70,7 @@ By default, the workload gets distributed to the workers with the round robin st ### Learn More -:ReadMore{link="https://nitro.unjs.io/deploy/node" title="the Nitro documentation for node-server preset"} +:ReadMore{link="" title="the Nitro documentation for node-server preset"} ## Static Hosting diff --git a/docs/1.getting-started/2.installation.md b/docs/1.getting-started/2.installation.md index 4b0a81e8e64b..fd23fb8a1465 100644 --- a/docs/1.getting-started/2.installation.md +++ b/docs/1.getting-started/2.installation.md @@ -10,12 +10,12 @@ Get started with Nuxt quickly with our online starters or start locally with you You can start playing with Nuxt 3 in your browser using our online sandboxes: -:button-link[Play on StackBlitz]{href="https://nuxt.new/s/v3" blank .mr-2} -:button-link[Play on CodeSandbox]{href="https://nuxt.new/c/v3" blank} +:button-link[Play on StackBlitz]{href="" blank .mr-2} +:button-link[Play on CodeSandbox]{href="" blank} Start with one of our starters and themes directly by opening [nuxt.new](https://nuxt.new). -:button-link[Discover nuxt.new]{href="https://nuxt.new" blank} +:button-link[Discover nuxt.new]{href="" blank} ## New Project diff --git a/docs/1.getting-started/9.layers.md b/docs/1.getting-started/9.layers.md index 3161569943fc..2c1a316f48e9 100644 --- a/docs/1.getting-started/9.layers.md +++ b/docs/1.getting-started/9.layers.md @@ -32,7 +32,7 @@ export default defineNuxtConfig({ A quick video made by [Learn Vue](https://go.learnvue.co) to showcase the power of `extends`: -:video-player{src="https://www.youtube.com/watch?v=lnFCM7c9f7I"} +:video-player{src=" ## Authoring Nuxt Layers diff --git a/docs/2.guide/1.concepts/2.vuejs-development.md b/docs/2.guide/1.concepts/2.vuejs-development.md index 137fb75f11b4..17ee2f79f38a 100644 --- a/docs/2.guide/1.concepts/2.vuejs-development.md +++ b/docs/2.guide/1.concepts/2.vuejs-development.md @@ -31,8 +31,8 @@ Most applications need multiple pages and a way to navigate between them. This i ### Example -:button-link[Open on StackBlitz]{href="https://stackblitz.com/edit/github-9hzuns?file=app.vue" blank .mr-2} -:button-link[Open on CodeSandbox]{href="https://codesandbox.io/s/nuxt-3-components-auto-import-2xq9z?file=/app.vue" blank} +:button-link[Open on StackBlitz]{href="" blank .mr-2} +:button-link[Open on CodeSandbox]{href="" blank} The `app.vue` file is the entry point, which represents the page displayed in the browser window. diff --git a/docs/2.guide/2.directory-structure/1.components.md b/docs/2.guide/2.directory-structure/1.components.md index 7a39da99f66f..cce9167c96c9 100644 --- a/docs/2.guide/2.directory-structure/1.components.md +++ b/docs/2.guide/2.directory-structure/1.components.md @@ -263,7 +263,7 @@ This feature only works with Nuxt auto-imports and `#components` imports. Explic Standalone server components will always be rendered on the server. When their props update, this will result in a network request that will update the rendered HTML in-place. -:video-player{src="https://www.youtube.com/watch?v=u1yyXe86xJM"} +:video-player{src=" > A video made by [LearnVue](https://go.learnvue.co) for the Nuxt documentation. diff --git a/docs/2.guide/2.directory-structure/1.plugins.md b/docs/2.guide/2.directory-structure/1.plugins.md index 091b3e68a46a..e086c1a0375a 100644 --- a/docs/2.guide/2.directory-structure/1.plugins.md +++ b/docs/2.guide/2.directory-structure/1.plugins.md @@ -207,7 +207,7 @@ export default defineNuxtPlugin((nuxtApp) => { }) ``` -:ReadMore{link="https://vuejs.org/guide/reusability/custom-directives.html"} +:ReadMore{link=" ::LinkExample{link="/docs/examples/app/plugins"} :: diff --git a/docs/2.guide/2.directory-structure/1.server.md b/docs/2.guide/2.directory-structure/1.server.md index 36927a446f19..0c9f982e2da7 100644 --- a/docs/2.guide/2.directory-structure/1.server.md +++ b/docs/2.guide/2.directory-structure/1.server.md @@ -13,7 +13,7 @@ Each file should export a default function defined with `defineEventHandler()`. The handler can directly return JSON data, a `Promise` or use `event.node.res.end()` to send response. -::ReadMore{link="https://nitro.unjs.io/guide/routing" title="Nitro Route Handling Docs"} +::ReadMore{link="" title="Nitro Route Handling Docs"} :: ## Example @@ -79,14 +79,14 @@ export default defineNitroPlugin((nitroApp) => { }) ``` -::ReadMore{link="https://nitro.unjs.io/guide/plugins" title="Nitro Plugins"} +::ReadMore{link="" title="Nitro Plugins"} :: ## Server Utilities Server routes are powered by [unjs/h3](https://github.com/unjs/h3) which comes with a handy set of helpers. -::ReadMore{link="https://www.jsdocs.io/package/h3#package-index-functions" title="Available H3 Request Helpers"} +::ReadMore{link="" title="Available H3 Request Helpers"} :: You can add more helpers yourself inside the `~/server/utils` directory. diff --git a/docs/3.api/1.composables/use-cookie.md b/docs/3.api/1.composables/use-cookie.md index f36e466f0abb..601afbd0a3fa 100644 --- a/docs/3.api/1.composables/use-cookie.md +++ b/docs/3.api/1.composables/use-cookie.md @@ -38,7 +38,7 @@ counter.value = counter.value || Math.round(Math.random() * 1000) ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/composables/use-cookie?terminal=dev&file=app.vue" blank} +:button-link[Open on StackBlitz]{href="" blank} ## Options diff --git a/docs/3.api/1.composables/use-nuxt-app.md b/docs/3.api/1.composables/use-nuxt-app.md index 70d4777d4357..ba932c2da44a 100644 --- a/docs/3.api/1.composables/use-nuxt-app.md +++ b/docs/3.api/1.composables/use-nuxt-app.md @@ -72,7 +72,7 @@ await nuxtApp.callHook('my-plugin:init') - [**directive()**](https://vuejs.org/api/application.html#app-directive) - Registers a global custom directive if passing both a name string and a directive definition, or retrieves an already registered one if only the name is passed[(example)](/docs/guide/directory-structure/plugins#vue-directives). - [**use()**](https://vuejs.org/api/application.html#app-use) - Installs a **[Vue.js Plugin](https://vuejs.org/guide/reusability/plugins.html)** [(example)](/docs/guide/directory-structure/plugins#vue-plugins). -:ReadMore{link="https://vuejs.org/api/application.html#application-api"} +:ReadMore{link=" ### `ssrContext` diff --git a/docs/3.api/1.composables/use-route.md b/docs/3.api/1.composables/use-route.md index 0d1f1f7146f8..de749b9859df 100644 --- a/docs/3.api/1.composables/use-route.md +++ b/docs/3.api/1.composables/use-route.md @@ -39,5 +39,5 @@ Apart from dynamic parameters and query parameters, `useRoute()` also provides t * **path**: encoded pathname section of the URL * **redirectedFrom**: route location that was attempted to access before ending up on the current route location -::ReadMore{link="https://router.vuejs.org/api/interfaces/RouteLocationNormalizedLoaded.html"} +::ReadMore{link=" :: diff --git a/docs/3.api/1.composables/use-router.md b/docs/3.api/1.composables/use-router.md index c38d14c36470..f4ea6935487c 100644 --- a/docs/3.api/1.composables/use-router.md +++ b/docs/3.api/1.composables/use-router.md @@ -11,7 +11,7 @@ Within the template of a Vue component, you can access the router using `$router If you have a `pages/` folder, `useRouter` is identical in behavior to the one provided by `vue-router`. Feel free to read the router documentation for more information on what each method does. -::ReadMore{link="https://router.vuejs.org/api/interfaces/Router.html#Properties-currentRoute"} +::ReadMore{link=" :: ## Basic Manipulation @@ -40,7 +40,7 @@ router.push({ path: "/home" }); router.replace({ hash: "#bio" }); ```` -::ReadMore{link="https://developer.mozilla.org/en-US/docs/Web/API/History"} +::ReadMore{link=" :: ## Navigation Guards @@ -58,7 +58,7 @@ However, Nuxt has a concept of **route middleware** that simplifies the implemen - **onError:** Adds an error handler that is called every time a non caught error happens during navigation. - **resolve:** Returns the normalized version of a route location. Also includes an `href` property that includes any existing base. -::ReadMore{link="https://router.vuejs.org/api/interfaces/Router.html#Methods"} +::ReadMore{link=" :: ## Universal Router Instance diff --git a/docs/3.api/2.components/2.nuxt-page.md b/docs/3.api/2.components/2.nuxt-page.md index fac45130f701..698727a8093a 100644 --- a/docs/3.api/2.components/2.nuxt-page.md +++ b/docs/3.api/2.components/2.nuxt-page.md @@ -44,7 +44,7 @@ definePageMeta({ ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/pages?file=app.vue" blank} +:button-link[Open on StackBlitz]{href="" blank} ## Custom Props diff --git a/docs/3.api/2.components/4.nuxt-link.md b/docs/3.api/2.components/4.nuxt-link.md index 42d4cd8a8e26..2154c4a62253 100644 --- a/docs/3.api/2.components/4.nuxt-link.md +++ b/docs/3.api/2.components/4.nuxt-link.md @@ -24,7 +24,7 @@ In this example, we use `` component to link to a website. ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/pages/index.vue" blank} +:button-link[Open on StackBlitz]{href="" blank} ### Internal Routing @@ -39,7 +39,7 @@ In this example, we use `` component to link to another page of the ap ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/pages/index.vue" blank} +:button-link[Open on StackBlitz]{href="" blank} ### `target` and `rel` Attributes @@ -69,7 +69,7 @@ In this example, we use `` with `target`, `rel`, and `noRel` props. ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/pages/index.vue" blank} +:button-link[Open on StackBlitz]{href="" blank} ## Props @@ -104,7 +104,7 @@ export default defineNuxtLink({ You can then use `` component as usual with your new defaults. -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/components/MyNuxtLink.ts" blank} +:button-link[Open on StackBlitz]{href="" blank} ### `defineNuxtLink` Signature diff --git a/docs/3.api/2.components/5.nuxt-loading-indicator.md b/docs/3.api/2.components/5.nuxt-loading-indicator.md index 13fe8a104ba7..4b208f591000 100644 --- a/docs/3.api/2.components/5.nuxt-loading-indicator.md +++ b/docs/3.api/2.components/5.nuxt-loading-indicator.md @@ -17,7 +17,7 @@ Add `` in your `app.vue` or layouts. ``` -:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/pages?terminal=dev&file=/app.vue" blank} +:button-link[Open on StackBlitz]{href="" blank} ::alert{type=warning} If you are changing layouts as well as page, the page transition you set here will not run. Instead, you should set a layout transition. diff --git a/docs/3.api/2.components/7.nuxt-welcome.md b/docs/3.api/2.components/7.nuxt-welcome.md index 87cfff0b4951..194c3eae779c 100644 --- a/docs/3.api/2.components/7.nuxt-welcome.md +++ b/docs/3.api/2.components/7.nuxt-welcome.md @@ -10,5 +10,5 @@ The `` component greets users in new projects made from the starter This component is part of [@nuxt/ui](https://github.com/nuxt/ui) :: -::ReadMore{link="https://github.com/nuxt/ui" title="@nuxt/ui"} +::ReadMore{link="" title="@nuxt/ui"} :: diff --git a/docs/3.api/3.utils/on-before-route-leave.md b/docs/3.api/3.utils/on-before-route-leave.md index af5cc5546917..26c40f258d61 100644 --- a/docs/3.api/3.utils/on-before-route-leave.md +++ b/docs/3.api/3.utils/on-before-route-leave.md @@ -7,5 +7,5 @@ description: The onBeforeRouteLeave composable allows registering a route guard The `onBeforeRouteLeave` composable adds a navigation guard that triggers whenever the component for the current location is about to be left. -::ReadMore{link="https://router.vuejs.org/api/#Functions-onBeforeRouteLeave"} +::ReadMore{link=" :: diff --git a/docs/3.api/3.utils/on-before-route-update.md b/docs/3.api/3.utils/on-before-route-update.md index c6886147e7db..84af7914e0f9 100644 --- a/docs/3.api/3.utils/on-before-route-update.md +++ b/docs/3.api/3.utils/on-before-route-update.md @@ -7,5 +7,5 @@ description: The onBeforeRouteUpdate composable allows registering a route guard The `onBeforeRouteUpdate` composable adds a navigation guard that triggers whenever the component for the current location is about to be updated. -::ReadMore{link="https://router.vuejs.org/api/#Functions-onBeforeRouteUpdate"} +::ReadMore{link=" :: diff --git a/docs/3.api/5.commands/devtools.md b/docs/3.api/5.commands/devtools.md index 714b300e903b..a2d862d1293a 100644 --- a/docs/3.api/5.commands/devtools.md +++ b/docs/3.api/5.commands/devtools.md @@ -15,5 +15,5 @@ Option | Default | Description -------------------------|-----------------|------------------ `rootDir` | `.` | The root directory of the app you want to enable devtools for. -::ReadMore{link="https://github.com/nuxt/devtools"} +::ReadMore{link=" :: diff --git a/docs/4.examples/6.advanced/jsx.md b/docs/4.examples/6.advanced/jsx.md index 06eea3aac2fc..97367fa8e977 100644 --- a/docs/4.examples/6.advanced/jsx.md +++ b/docs/4.examples/6.advanced/jsx.md @@ -6,7 +6,7 @@ toc: false This example shows how to use [jsx syntax](https://vuejs.org/guide/extras/render-function.html#jsx-tsx) with typescript in Nuxt pages and components. -::ReadMore{link="https://vuejs.org/guide/extras/render-function.html#jsx-tsx"} +::ReadMore{link=" :: ::sandbox{repo="nuxt/nuxt" branch="main" dir="examples/advanced/jsx" file="nuxt.config.ts"} diff --git a/docs/4.examples/7.experimental/reactivity-transform.md b/docs/4.examples/7.experimental/reactivity-transform.md index 3fb91a94af55..ba2261ee9c87 100644 --- a/docs/4.examples/7.experimental/reactivity-transform.md +++ b/docs/4.examples/7.experimental/reactivity-transform.md @@ -6,7 +6,7 @@ toc: false This example demonstrates the support of Reactivity Transform in Nuxt 3. -::ReadMore{link="https://vuejs.org/guide/extras/reactivity-transform.html" title="Reactivity Transform"} +::ReadMore{link="" title="Reactivity Transform"} :: ::sandbox{repo="nuxt/nuxt" branch="main" dir="examples/experimental/reactivity-transform" file="app.vue"} diff --git a/docs/5.community/3.reporting-bugs.md b/docs/5.community/3.reporting-bugs.md index 5d0f05558447..626cf2f80368 100644 --- a/docs/5.community/3.reporting-bugs.md +++ b/docs/5.community/3.reporting-bugs.md @@ -32,18 +32,18 @@ If your issue concerns Vue 3 or Vite, please try to reproduce it first with the **Nuxt 3**: -:button-link[Nuxt 3 on StackBlitz]{href="https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz" blank .mr-2} -:button-link[Nuxt 3 on CodeSandbox]{href="https://codesandbox.io/p/github/nuxt/starter/v3-codesandbox" blank} +:button-link[Nuxt 3 on StackBlitz]{href="" blank .mr-2} +:button-link[Nuxt 3 on CodeSandbox]{href="" blank} **Nuxt Bridge**: -:button-link[Nuxt Bridge on CodeSandbox]{href="https://codesandbox.io/p/github/nuxt/starter/v2-bridge-codesandbox" blank} +:button-link[Nuxt Bridge on CodeSandbox]{href="" blank} **Vue 3**: -:button-link[Vue 3 SSR on StackBlitz]{href="https://stackblitz.com/github/nuxt-contrib/vue3-ssr-starter/tree/main?terminal=dev" blank .mr-2} -:button-link[Vue 3 SSR on CodeSandbox]{href="https://codesandbox.io/p/github/nuxt-contrib/vue3-ssr-starter/main" blank .mr-2} -:button-link[Vue 3 SSR Template]{href="https://github.com/nuxt-contrib/vue3-ssr-starter/generate" blank} +:button-link[Vue 3 SSR on StackBlitz]{href="" blank .mr-2} +:button-link[Vue 3 SSR on CodeSandbox]{href="" blank .mr-2} +:button-link[Vue 3 SSR Template]{href="" blank} Once you've reproduced the issue, remove as much code from your reproduction as you can (while still recreating the bug). The time spent making the reproduction as minimal as possible will make a huge difference to whoever sets out to fix the issue. From 34be3f6a052b568d2f6efd2fdf777771984384c6 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 1 May 2023 13:24:53 +0100 Subject: [PATCH 6/6] Revert "[autofix.ci] apply automated fixes" This reverts commit 4fa7bae6eb0204a93ec0ccf42e2053581608679c. --- docs/1.getting-started/10.deployment.md | 2 +- docs/1.getting-started/2.installation.md | 6 +++--- docs/1.getting-started/9.layers.md | 2 +- docs/2.guide/1.concepts/2.vuejs-development.md | 4 ++-- docs/2.guide/2.directory-structure/1.components.md | 2 +- docs/2.guide/2.directory-structure/1.plugins.md | 2 +- docs/2.guide/2.directory-structure/1.server.md | 6 +++--- docs/3.api/1.composables/use-cookie.md | 2 +- docs/3.api/1.composables/use-nuxt-app.md | 2 +- docs/3.api/1.composables/use-route.md | 2 +- docs/3.api/1.composables/use-router.md | 6 +++--- docs/3.api/2.components/2.nuxt-page.md | 2 +- docs/3.api/2.components/4.nuxt-link.md | 8 ++++---- docs/3.api/2.components/5.nuxt-loading-indicator.md | 2 +- docs/3.api/2.components/7.nuxt-welcome.md | 2 +- docs/3.api/3.utils/on-before-route-leave.md | 2 +- docs/3.api/3.utils/on-before-route-update.md | 2 +- docs/3.api/5.commands/devtools.md | 2 +- docs/4.examples/6.advanced/jsx.md | 2 +- .../7.experimental/reactivity-transform.md | 2 +- docs/5.community/3.reporting-bugs.md | 12 ++++++------ 21 files changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/1.getting-started/10.deployment.md b/docs/1.getting-started/10.deployment.md index b9b607b4ed49..da1aeb93bda1 100644 --- a/docs/1.getting-started/10.deployment.md +++ b/docs/1.getting-started/10.deployment.md @@ -70,7 +70,7 @@ By default, the workload gets distributed to the workers with the round robin st ### Learn More -:ReadMore{link="" title="the Nitro documentation for node-server preset"} +:ReadMore{link="https://nitro.unjs.io/deploy/node" title="the Nitro documentation for node-server preset"} ## Static Hosting diff --git a/docs/1.getting-started/2.installation.md b/docs/1.getting-started/2.installation.md index fd23fb8a1465..4b0a81e8e64b 100644 --- a/docs/1.getting-started/2.installation.md +++ b/docs/1.getting-started/2.installation.md @@ -10,12 +10,12 @@ Get started with Nuxt quickly with our online starters or start locally with you You can start playing with Nuxt 3 in your browser using our online sandboxes: -:button-link[Play on StackBlitz]{href="" blank .mr-2} -:button-link[Play on CodeSandbox]{href="" blank} +:button-link[Play on StackBlitz]{href="https://nuxt.new/s/v3" blank .mr-2} +:button-link[Play on CodeSandbox]{href="https://nuxt.new/c/v3" blank} Start with one of our starters and themes directly by opening [nuxt.new](https://nuxt.new). -:button-link[Discover nuxt.new]{href="" blank} +:button-link[Discover nuxt.new]{href="https://nuxt.new" blank} ## New Project diff --git a/docs/1.getting-started/9.layers.md b/docs/1.getting-started/9.layers.md index 2c1a316f48e9..3161569943fc 100644 --- a/docs/1.getting-started/9.layers.md +++ b/docs/1.getting-started/9.layers.md @@ -32,7 +32,7 @@ export default defineNuxtConfig({ A quick video made by [Learn Vue](https://go.learnvue.co) to showcase the power of `extends`: -:video-player{src=" +:video-player{src="https://www.youtube.com/watch?v=lnFCM7c9f7I"} ## Authoring Nuxt Layers diff --git a/docs/2.guide/1.concepts/2.vuejs-development.md b/docs/2.guide/1.concepts/2.vuejs-development.md index 17ee2f79f38a..137fb75f11b4 100644 --- a/docs/2.guide/1.concepts/2.vuejs-development.md +++ b/docs/2.guide/1.concepts/2.vuejs-development.md @@ -31,8 +31,8 @@ Most applications need multiple pages and a way to navigate between them. This i ### Example -:button-link[Open on StackBlitz]{href="" blank .mr-2} -:button-link[Open on CodeSandbox]{href="" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/edit/github-9hzuns?file=app.vue" blank .mr-2} +:button-link[Open on CodeSandbox]{href="https://codesandbox.io/s/nuxt-3-components-auto-import-2xq9z?file=/app.vue" blank} The `app.vue` file is the entry point, which represents the page displayed in the browser window. diff --git a/docs/2.guide/2.directory-structure/1.components.md b/docs/2.guide/2.directory-structure/1.components.md index cce9167c96c9..7a39da99f66f 100644 --- a/docs/2.guide/2.directory-structure/1.components.md +++ b/docs/2.guide/2.directory-structure/1.components.md @@ -263,7 +263,7 @@ This feature only works with Nuxt auto-imports and `#components` imports. Explic Standalone server components will always be rendered on the server. When their props update, this will result in a network request that will update the rendered HTML in-place. -:video-player{src=" +:video-player{src="https://www.youtube.com/watch?v=u1yyXe86xJM"} > A video made by [LearnVue](https://go.learnvue.co) for the Nuxt documentation. diff --git a/docs/2.guide/2.directory-structure/1.plugins.md b/docs/2.guide/2.directory-structure/1.plugins.md index e086c1a0375a..091b3e68a46a 100644 --- a/docs/2.guide/2.directory-structure/1.plugins.md +++ b/docs/2.guide/2.directory-structure/1.plugins.md @@ -207,7 +207,7 @@ export default defineNuxtPlugin((nuxtApp) => { }) ``` -:ReadMore{link=" +:ReadMore{link="https://vuejs.org/guide/reusability/custom-directives.html"} ::LinkExample{link="/docs/examples/app/plugins"} :: diff --git a/docs/2.guide/2.directory-structure/1.server.md b/docs/2.guide/2.directory-structure/1.server.md index 0c9f982e2da7..36927a446f19 100644 --- a/docs/2.guide/2.directory-structure/1.server.md +++ b/docs/2.guide/2.directory-structure/1.server.md @@ -13,7 +13,7 @@ Each file should export a default function defined with `defineEventHandler()`. The handler can directly return JSON data, a `Promise` or use `event.node.res.end()` to send response. -::ReadMore{link="" title="Nitro Route Handling Docs"} +::ReadMore{link="https://nitro.unjs.io/guide/routing" title="Nitro Route Handling Docs"} :: ## Example @@ -79,14 +79,14 @@ export default defineNitroPlugin((nitroApp) => { }) ``` -::ReadMore{link="" title="Nitro Plugins"} +::ReadMore{link="https://nitro.unjs.io/guide/plugins" title="Nitro Plugins"} :: ## Server Utilities Server routes are powered by [unjs/h3](https://github.com/unjs/h3) which comes with a handy set of helpers. -::ReadMore{link="" title="Available H3 Request Helpers"} +::ReadMore{link="https://www.jsdocs.io/package/h3#package-index-functions" title="Available H3 Request Helpers"} :: You can add more helpers yourself inside the `~/server/utils` directory. diff --git a/docs/3.api/1.composables/use-cookie.md b/docs/3.api/1.composables/use-cookie.md index 601afbd0a3fa..f36e466f0abb 100644 --- a/docs/3.api/1.composables/use-cookie.md +++ b/docs/3.api/1.composables/use-cookie.md @@ -38,7 +38,7 @@ counter.value = counter.value || Math.round(Math.random() * 1000) ``` -:button-link[Open on StackBlitz]{href="" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/composables/use-cookie?terminal=dev&file=app.vue" blank} ## Options diff --git a/docs/3.api/1.composables/use-nuxt-app.md b/docs/3.api/1.composables/use-nuxt-app.md index ba932c2da44a..70d4777d4357 100644 --- a/docs/3.api/1.composables/use-nuxt-app.md +++ b/docs/3.api/1.composables/use-nuxt-app.md @@ -72,7 +72,7 @@ await nuxtApp.callHook('my-plugin:init') - [**directive()**](https://vuejs.org/api/application.html#app-directive) - Registers a global custom directive if passing both a name string and a directive definition, or retrieves an already registered one if only the name is passed[(example)](/docs/guide/directory-structure/plugins#vue-directives). - [**use()**](https://vuejs.org/api/application.html#app-use) - Installs a **[Vue.js Plugin](https://vuejs.org/guide/reusability/plugins.html)** [(example)](/docs/guide/directory-structure/plugins#vue-plugins). -:ReadMore{link=" +:ReadMore{link="https://vuejs.org/api/application.html#application-api"} ### `ssrContext` diff --git a/docs/3.api/1.composables/use-route.md b/docs/3.api/1.composables/use-route.md index de749b9859df..0d1f1f7146f8 100644 --- a/docs/3.api/1.composables/use-route.md +++ b/docs/3.api/1.composables/use-route.md @@ -39,5 +39,5 @@ Apart from dynamic parameters and query parameters, `useRoute()` also provides t * **path**: encoded pathname section of the URL * **redirectedFrom**: route location that was attempted to access before ending up on the current route location -::ReadMore{link=" +::ReadMore{link="https://router.vuejs.org/api/interfaces/RouteLocationNormalizedLoaded.html"} :: diff --git a/docs/3.api/1.composables/use-router.md b/docs/3.api/1.composables/use-router.md index f4ea6935487c..c38d14c36470 100644 --- a/docs/3.api/1.composables/use-router.md +++ b/docs/3.api/1.composables/use-router.md @@ -11,7 +11,7 @@ Within the template of a Vue component, you can access the router using `$router If you have a `pages/` folder, `useRouter` is identical in behavior to the one provided by `vue-router`. Feel free to read the router documentation for more information on what each method does. -::ReadMore{link=" +::ReadMore{link="https://router.vuejs.org/api/interfaces/Router.html#Properties-currentRoute"} :: ## Basic Manipulation @@ -40,7 +40,7 @@ router.push({ path: "/home" }); router.replace({ hash: "#bio" }); ```` -::ReadMore{link=" +::ReadMore{link="https://developer.mozilla.org/en-US/docs/Web/API/History"} :: ## Navigation Guards @@ -58,7 +58,7 @@ However, Nuxt has a concept of **route middleware** that simplifies the implemen - **onError:** Adds an error handler that is called every time a non caught error happens during navigation. - **resolve:** Returns the normalized version of a route location. Also includes an `href` property that includes any existing base. -::ReadMore{link=" +::ReadMore{link="https://router.vuejs.org/api/interfaces/Router.html#Methods"} :: ## Universal Router Instance diff --git a/docs/3.api/2.components/2.nuxt-page.md b/docs/3.api/2.components/2.nuxt-page.md index 698727a8093a..fac45130f701 100644 --- a/docs/3.api/2.components/2.nuxt-page.md +++ b/docs/3.api/2.components/2.nuxt-page.md @@ -44,7 +44,7 @@ definePageMeta({ ``` -:button-link[Open on StackBlitz]{href="" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/pages?file=app.vue" blank} ## Custom Props diff --git a/docs/3.api/2.components/4.nuxt-link.md b/docs/3.api/2.components/4.nuxt-link.md index 2154c4a62253..42d4cd8a8e26 100644 --- a/docs/3.api/2.components/4.nuxt-link.md +++ b/docs/3.api/2.components/4.nuxt-link.md @@ -24,7 +24,7 @@ In this example, we use `` component to link to a website. ``` -:button-link[Open on StackBlitz]{href="" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/pages/index.vue" blank} ### Internal Routing @@ -39,7 +39,7 @@ In this example, we use `` component to link to another page of the ap ``` -:button-link[Open on StackBlitz]{href="" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/pages/index.vue" blank} ### `target` and `rel` Attributes @@ -69,7 +69,7 @@ In this example, we use `` with `target`, `rel`, and `noRel` props. ``` -:button-link[Open on StackBlitz]{href="" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/pages/index.vue" blank} ## Props @@ -104,7 +104,7 @@ export default defineNuxtLink({ You can then use `` component as usual with your new defaults. -:button-link[Open on StackBlitz]{href="" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/nuxt-link?terminal=dev&file=/components/MyNuxtLink.ts" blank} ### `defineNuxtLink` Signature diff --git a/docs/3.api/2.components/5.nuxt-loading-indicator.md b/docs/3.api/2.components/5.nuxt-loading-indicator.md index 4b208f591000..13fe8a104ba7 100644 --- a/docs/3.api/2.components/5.nuxt-loading-indicator.md +++ b/docs/3.api/2.components/5.nuxt-loading-indicator.md @@ -17,7 +17,7 @@ Add `` in your `app.vue` or layouts. ``` -:button-link[Open on StackBlitz]{href="" blank} +:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/pages?terminal=dev&file=/app.vue" blank} ::alert{type=warning} If you are changing layouts as well as page, the page transition you set here will not run. Instead, you should set a layout transition. diff --git a/docs/3.api/2.components/7.nuxt-welcome.md b/docs/3.api/2.components/7.nuxt-welcome.md index 194c3eae779c..87cfff0b4951 100644 --- a/docs/3.api/2.components/7.nuxt-welcome.md +++ b/docs/3.api/2.components/7.nuxt-welcome.md @@ -10,5 +10,5 @@ The `` component greets users in new projects made from the starter This component is part of [@nuxt/ui](https://github.com/nuxt/ui) :: -::ReadMore{link="" title="@nuxt/ui"} +::ReadMore{link="https://github.com/nuxt/ui" title="@nuxt/ui"} :: diff --git a/docs/3.api/3.utils/on-before-route-leave.md b/docs/3.api/3.utils/on-before-route-leave.md index 26c40f258d61..af5cc5546917 100644 --- a/docs/3.api/3.utils/on-before-route-leave.md +++ b/docs/3.api/3.utils/on-before-route-leave.md @@ -7,5 +7,5 @@ description: The onBeforeRouteLeave composable allows registering a route guard The `onBeforeRouteLeave` composable adds a navigation guard that triggers whenever the component for the current location is about to be left. -::ReadMore{link=" +::ReadMore{link="https://router.vuejs.org/api/#Functions-onBeforeRouteLeave"} :: diff --git a/docs/3.api/3.utils/on-before-route-update.md b/docs/3.api/3.utils/on-before-route-update.md index 84af7914e0f9..c6886147e7db 100644 --- a/docs/3.api/3.utils/on-before-route-update.md +++ b/docs/3.api/3.utils/on-before-route-update.md @@ -7,5 +7,5 @@ description: The onBeforeRouteUpdate composable allows registering a route guard The `onBeforeRouteUpdate` composable adds a navigation guard that triggers whenever the component for the current location is about to be updated. -::ReadMore{link=" +::ReadMore{link="https://router.vuejs.org/api/#Functions-onBeforeRouteUpdate"} :: diff --git a/docs/3.api/5.commands/devtools.md b/docs/3.api/5.commands/devtools.md index a2d862d1293a..714b300e903b 100644 --- a/docs/3.api/5.commands/devtools.md +++ b/docs/3.api/5.commands/devtools.md @@ -15,5 +15,5 @@ Option | Default | Description -------------------------|-----------------|------------------ `rootDir` | `.` | The root directory of the app you want to enable devtools for. -::ReadMore{link=" +::ReadMore{link="https://github.com/nuxt/devtools"} :: diff --git a/docs/4.examples/6.advanced/jsx.md b/docs/4.examples/6.advanced/jsx.md index 97367fa8e977..06eea3aac2fc 100644 --- a/docs/4.examples/6.advanced/jsx.md +++ b/docs/4.examples/6.advanced/jsx.md @@ -6,7 +6,7 @@ toc: false This example shows how to use [jsx syntax](https://vuejs.org/guide/extras/render-function.html#jsx-tsx) with typescript in Nuxt pages and components. -::ReadMore{link=" +::ReadMore{link="https://vuejs.org/guide/extras/render-function.html#jsx-tsx"} :: ::sandbox{repo="nuxt/nuxt" branch="main" dir="examples/advanced/jsx" file="nuxt.config.ts"} diff --git a/docs/4.examples/7.experimental/reactivity-transform.md b/docs/4.examples/7.experimental/reactivity-transform.md index ba2261ee9c87..3fb91a94af55 100644 --- a/docs/4.examples/7.experimental/reactivity-transform.md +++ b/docs/4.examples/7.experimental/reactivity-transform.md @@ -6,7 +6,7 @@ toc: false This example demonstrates the support of Reactivity Transform in Nuxt 3. -::ReadMore{link="" title="Reactivity Transform"} +::ReadMore{link="https://vuejs.org/guide/extras/reactivity-transform.html" title="Reactivity Transform"} :: ::sandbox{repo="nuxt/nuxt" branch="main" dir="examples/experimental/reactivity-transform" file="app.vue"} diff --git a/docs/5.community/3.reporting-bugs.md b/docs/5.community/3.reporting-bugs.md index 626cf2f80368..5d0f05558447 100644 --- a/docs/5.community/3.reporting-bugs.md +++ b/docs/5.community/3.reporting-bugs.md @@ -32,18 +32,18 @@ If your issue concerns Vue 3 or Vite, please try to reproduce it first with the **Nuxt 3**: -:button-link[Nuxt 3 on StackBlitz]{href="" blank .mr-2} -:button-link[Nuxt 3 on CodeSandbox]{href="" blank} +:button-link[Nuxt 3 on StackBlitz]{href="https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz" blank .mr-2} +:button-link[Nuxt 3 on CodeSandbox]{href="https://codesandbox.io/p/github/nuxt/starter/v3-codesandbox" blank} **Nuxt Bridge**: -:button-link[Nuxt Bridge on CodeSandbox]{href="" blank} +:button-link[Nuxt Bridge on CodeSandbox]{href="https://codesandbox.io/p/github/nuxt/starter/v2-bridge-codesandbox" blank} **Vue 3**: -:button-link[Vue 3 SSR on StackBlitz]{href="" blank .mr-2} -:button-link[Vue 3 SSR on CodeSandbox]{href="" blank .mr-2} -:button-link[Vue 3 SSR Template]{href="" blank} +:button-link[Vue 3 SSR on StackBlitz]{href="https://stackblitz.com/github/nuxt-contrib/vue3-ssr-starter/tree/main?terminal=dev" blank .mr-2} +:button-link[Vue 3 SSR on CodeSandbox]{href="https://codesandbox.io/p/github/nuxt-contrib/vue3-ssr-starter/main" blank .mr-2} +:button-link[Vue 3 SSR Template]{href="https://github.com/nuxt-contrib/vue3-ssr-starter/generate" blank} Once you've reproduced the issue, remove as much code from your reproduction as you can (while still recreating the bug). The time spent making the reproduction as minimal as possible will make a huge difference to whoever sets out to fix the issue.