Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update nuxt links #1906

Merged
merged 1 commit into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
value: |
The reporting guideline of nuxt-modules/i18n is compliant with Nuxt too.
Please carefully read the contribution docs before creating a bug report.
πŸ‘‰ https://v3.nuxtjs.org/community/reporting-bugs
πŸ‘‰ https://nuxt.com/docs/community/reporting-bugs

Please use a template below to create a minimal reproduction, and provide to us your issue cases
πŸ‘‰ https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz
Expand All @@ -24,7 +24,7 @@ body:
id: reproduction
attributes:
label: Reproduction
description: Please provide a link to a repo that can reproduce the problem you ran into. A [**minimal reproduction**](https://v3.nuxtjs.org/community/reporting-bugs#create-a-minimal-reproduction) is required unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. If no reproduction is provided we might close it.
description: Please provide a link to a repo that can reproduce the problem you ran into. A [**minimal reproduction**](https://nuxt.com/docs/community/reporting-bugs#create-a-minimal-reproduction) is required unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. If no reproduction is provided we might close it.
placeholder: Reproduction
validations:
required: true
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:

Please carefully read the contribution docs before suggesting a new feature.
(The feature request guideline of nuxt-modules/i18n is compliant with Nuxt too)
πŸ‘‰ https://v3.nuxtjs.org/community/contribution/#creating-an-issue
πŸ‘‰ https://nuxt.com/docs/community/contribution#creating-an-issue
- type: textarea
id: feature-description
attributes:
Expand All @@ -32,7 +32,7 @@ body:
label: Final checks
description: Before submitting, please make sure you do the following
options:
- label: Read the [contribution guide](https://v3.nuxtjs.org/community/contribution) (The contribution guideline of nuxt-modules/i18n is compliant with Nuxt too).
- label: Read the [contribution guide](https://nuxt.com/docs/community/contribution) (The contribution guideline of nuxt-modules/i18n is compliant with Nuxt too).
required: true
- label: Check existing [discussions](https://github.com/nuxt-modules/i18n/discussions) and [issues](https://github.com/nuxt/framework/issues).
- label: Check existing [discussions](https://github.com/nuxt-modules/i18n/discussions) and [issues](https://github.com/nuxt/nuxt/issues).
required: true
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
☝️ PR title should follow conventional commits (https://conventionalcommits.org)

Please carefully read the contribution docs before creating a pull request
πŸ‘‰ https://v3.nuxtjs.org/community/contribution
πŸ‘‰ https://nuxtjs.com/docs/community/contribution
-->

### πŸ”— Linked issue
Expand Down
2 changes: 1 addition & 1 deletion docs/content/1.getting-started/1.setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
::

::alert{type="info"}
Check the [Nuxt.js documentation](https://v3.nuxtjs.org/guide/features/modules) for more information about installing and using modules in Nuxt.js.
Check the [Nuxt.js documentation](https://nuxt.com/docs/guide/concepts/modules) for more information about installing and using modules in Nuxt.js.
::

Add `@nuxtjs/i18n` dependency to your project:
Expand Down
6 changes: 3 additions & 3 deletions docs/content/1.getting-started/2.basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ const { locale } = useI18n()

::alert{type="info"}

The code demonstrated in this chapter is illustrated using Nuxt [Pages](https://v3.nuxtjs.org/guide/directory-structure/pages).
The code demonstrated in this chapter is illustrated using Nuxt [Pages](https://nuxt.com/docs/guide/directory-structure/pages).

::

::alert{type="info"}

Some composable functions provided by @nuxtjs/i18n such as `useI18n` are [auto-imported by Nuxt](https://v3.nuxtjs.org/guide/concepts/auto-imports#auto-imports)
Some composable functions provided by @nuxtjs/i18n such as `useI18n` are [auto-imported by Nuxt](https://nuxt.com/docs/guide/concepts/auto-imports#auto-imports)

If you want to import them explicitly, you can use `#imports` as follows:

Expand Down Expand Up @@ -149,7 +149,7 @@ const localePath = useLocalePath()
</template>
```

Note that `localePath` can use the route's unprefixed path, which must start with `'/'` or the route's base name to generate the localized URL. The base name corresponds to the names Nuxt generates when parsing your `pages` directory, more info in [Nuxt's doc](https://v3.nuxtjs.org/guide/directory-structure/pages).
Note that `localePath` can use the route's unprefixed path, which must start with `'/'` or the route's base name to generate the localized URL. The base name corresponds to the names Nuxt generates when parsing your `pages` directory, more info in [Nuxt's doc](https://nuxt.com/docs/guide/directory-structure/pages).

::alert{type="info"}

Expand Down
2 changes: 1 addition & 1 deletion docs/content/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ snippet: npm install @nuxtjs/i18n@next --save-dev
Nuxt [I18n]{.text-primary-400}

#description
[I18n module](https://github.com/nuxt-community/i18n-module) for [Nuxt](https://nuxt.com)
[I18n module](https://github.com/nuxt-modules/i18n) for [Nuxt](https://nuxt.com)

#extra
::list
Expand Down
10 changes: 5 additions & 5 deletions docs/content/2.guide/7.seo.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ export default defineNuxtConfig({

## Setup

The `useLocaleHead` is a composable function, Calling that composable function returns a function that returns metadata that is handled by [Head management](https://v3.nuxtjs.org/guide/features/head-management#head-management) that is integrated within Nuxt. That metadata can be specified the `setup` function in various places within Nuxt:
The `useLocaleHead` is a composable function, Calling that composable function returns a function that returns metadata that is handled by [Head management](https://nuxt.com/docs/getting-started/seo-meta) that is integrated within Nuxt. That metadata can be specified the `setup` function in various places within Nuxt:

- [`app.vue`](https://v3.nuxtjs.org/guide/directory-structure/app)
- Vue components of [`pages`](https://v3.nuxtjs.org/guide/directory-structure/pages) directory
- Vue components of [`layouts`](https://v3.nuxtjs.org/guide/directory-structure/layouts) directory
- [`app.vue`](https://nuxt.com/docs/guide/directory-structure/app)
- Vue components of [`pages`](https://nuxt.com/docs/guide/directory-structure/pages) directory
- Vue components of [`layouts`](https://nuxt.com/docs/guide/directory-structure/layouts) directory

To enable SEO metadata, declare a `setup` function in one of the places specified above and make it return the result of a `useLocaleHead` function call.

To avoid duplicating the code, it's recommended to set globally with [Meta Components](https://v3.nuxtjs.org/guide/features/head-management#meta-components) in [layout components](https://v3.nuxtjs.org/guide/directory-structure/layouts) and override some values per-page Vue component like [`definePageMeta`](https://v3.nuxtjs.org/guide/directory-structure/pages#page-metadata), if necessary.
To avoid duplicating the code, it's recommended to set globally with [Meta Components](https://nuxt.com/docs/getting-started/seo-meta#components) in [layout components](https://nuxt.com/docs/guide/directory-structure/layouts) and override some values per-page Vue component like [`definePageMeta`](https://nuxt.com/docs/guide/directory-structure/pages#page-metadata), if necessary.

::code-group
```vue {}[app.vue]
Expand Down
6 changes: 3 additions & 3 deletions docs/content/2.guide/9.lang-switcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ To work around the issue, you can set the option [`skipSettingLocaleOnNavigate`]

### Global transition

If you would like to transition the entire Nuxt app, you can use the [`transition` of `NuxtPage`](https://v3.nuxtjs.org/getting-started/transitions#transition-with-nuxtpage) to control it as follows:
If you would like to transition the entire Nuxt app, you can use the [`transition` of `NuxtPage`](https://nuxt.com/docs/getting-started/transitions#transition-with-nuxtpage) to control it as follows:

```ts {}[nuxt.config.ts]
export default defineNuxtConfig({
Expand Down Expand Up @@ -189,7 +189,7 @@ const onBeforeEnter = async () => {
</style>
```

Optional, wait for locale before scrolling for a smoother transition with [Router Options](https://v3.nuxtjs.org/guide/directory-structure/pages#router-options):
Optional, wait for locale before scrolling for a smoother transition with [Router Options](https://nuxt.com/docs/guide/directory-structure/pages#router-options):

```ts {}[app/router.options.ts]
import type { RouterConfig } from '@nuxt/schema'
Expand All @@ -212,7 +212,7 @@ export default <RouterConfig>{

### Per page component transition

If you have a specific transition defined in a page component with [`definePageMeta`](https://v3.nuxtjs.org/guide/directory-structure/pages/#page-metadata) and need to add `finalizePendingLocaleChange` at `onBeforeEnter` hook for `pageTransition`.
If you have a specific transition defined in a page component with [`definePageMeta`](https://nuxt.com/docs/guide/directory-structure/pages#page-metadata) and need to add `finalizePendingLocaleChange` at `onBeforeEnter` hook for `pageTransition`.

Example:

Expand Down
2 changes: 1 addition & 1 deletion docs/content/4.API/2.compiler-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Compiler Macros for Nuxt i18n module.

## `defineI18nRoute`

`defineI18nRoute` is a compiler macro that you can use to set custom route paths 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 route paths for each static or dynamic route of your Nuxt application.
`defineI18nRoute` is a compiler macro that you can use to set custom route paths for your **page** components located in the `pages/` directory (unless [set otherwise](https://nuxt.com/docs/api/configuration/nuxt-config#pages-1)). This way you can set custom route paths for each static or dynamic route of your Nuxt application.

```vue [pages/some-page.vue]
<script setup>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/4.API/5.nuxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following APIs are exposed both on `NuxtApp`.

- **Type**: [`VueI18n` | `Composer`]

See also [NuxtApp](https://v3.nuxtjs.org/guide/going-further/nuxt-app/#accessing-nuxtapp)
See also [NuxtApp](https://nuxt.com/docs/guide/going-further/nuxt-app#accessing-nuxtapp)

`$i18n` is the global `Composer` or global `VueI18n` instance of Vue I18n. See about details [here](https://vue-i18n.intlify.dev/api/general.html#i18n)

Expand Down
2 changes: 1 addition & 1 deletion playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Module1 from './module1'
import type { NuxtApp } from 'nuxt/dist/app/index'

// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
// https://nuxt.com/docs/guide/directory-structure/nuxt.config
export default defineNuxtConfig({
modules: [Module1, '@nuxtjs/i18n'],

Expand Down
6 changes: 3 additions & 3 deletions playground/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
// https://v3.nuxtjs.org/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
2 changes: 1 addition & 1 deletion specs/fixtures/basic/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import CustomModule from './module'

// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
// https://nuxt.com/docs/guide/directory-structure/nuxt.config
export default defineNuxtConfig({
modules: [CustomModule, '@nuxtjs/i18n'],

Expand Down
2 changes: 1 addition & 1 deletion specs/fixtures/basic_usage/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
// https://nuxt.com/docs/guide/directory-structure/nuxt.config
export default defineNuxtConfig({
modules: ['@nuxtjs/i18n'],

Expand Down
2 changes: 1 addition & 1 deletion specs/fixtures/fallback/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
// https://nuxt.com/docs/guide/directory-structure/nuxt.config
export default defineNuxtConfig({
modules: ['@nuxtjs/i18n'],

Expand Down
2 changes: 1 addition & 1 deletion specs/fixtures/head/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
// https://nuxt.com/docs/guide/directory-structure/nuxt.config
export default defineNuxtConfig({
modules: ['@nuxtjs/i18n'],

Expand Down
2 changes: 1 addition & 1 deletion specs/fixtures/issues/1740/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://v3.nuxtjs.org/api/configuration/nuxt.config
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
extends: './playground'
})
2 changes: 1 addition & 1 deletion specs/fixtures/lazy/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
// https://nuxt.com/docs/guide/directory-structure/nuxt.config
export default defineNuxtConfig({
modules: ['@nuxtjs/i18n'],

Expand Down
2 changes: 1 addition & 1 deletion specs/fixtures/switcher/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
// https://nuxt.com/docs/guide/directory-structure/nuxt.config
export default defineNuxtConfig({
modules: ['@nuxtjs/i18n'],

Expand Down
2 changes: 1 addition & 1 deletion specs/fixtures/vue_i18n_options_loader/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
// https://nuxt.com/docs/guide/directory-structure/nuxt.config
export default defineNuxtConfig({
modules: ['@nuxtjs/i18n'],

Expand Down