Skip to content

Commit 0fef864

Browse files
committed
docs: add 3.x prefix to all internal links
resolves nuxt/nuxt.com#1986
1 parent 557656e commit 0fef864

File tree

143 files changed

+544
-529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+544
-529
lines changed

docs/1.getting-started/01.introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ We made everything so you can start writing `.vue` files from the beginning whil
1212
Nuxt has no vendor lock-in, allowing you to deploy your application [**everywhere, even on the edge**](/blog/nuxt-on-the-edge).
1313

1414
::tip
15-
If you want to play around with Nuxt in your browser, you can [try it out in one of our online sandboxes](/docs/getting-started/installation#play-online).
15+
If you want to play around with Nuxt in your browser, you can [try it out in one of our online sandboxes](/docs/3.x/getting-started/installation#play-online).
1616
::
1717

1818
## Automation and Conventions
1919

2020
Nuxt uses conventions and an opinionated directory structure to automate repetitive tasks and allow developers to focus on pushing features. The configuration file can still customize and override its default behaviors.
2121

22-
- **File-based routing:** define routes based on the structure of your [`pages/` directory](/docs/guide/directory-structure/pages). This can make it easier to organize your application and avoid the need for manual route configuration.
22+
- **File-based routing:** define routes based on the structure of your [`pages/` directory](/docs/3.x/guide/directory-structure/pages). This can make it easier to organize your application and avoid the need for manual route configuration.
2323
- **Code splitting:** Nuxt automatically splits your code into smaller chunks, which can help reduce the initial load time of your application.
2424
- **Server-side rendering out of the box:** Nuxt comes with built-in SSR capabilities, so you don't have to set up a separate server yourself.
2525
- **Auto-imports:** write Vue composables and components in their respective directories and use them without having to import them with the benefits of tree-shaking and optimized JS bundles.

docs/1.getting-started/03.configuration.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ description: Nuxt is configured with sensible defaults to make you productive.
44
navigation.icon: i-lucide-cog
55
---
66

7-
By default, Nuxt is configured to cover most use cases. The [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file can override or extend this default configuration.
7+
By default, Nuxt is configured to cover most use cases. The [`nuxt.config.ts`](/docs/3.x/guide/directory-structure/nuxt-config) file can override or extend this default configuration.
88

99
## Nuxt Configuration
1010

11-
The [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file is located at the root of a Nuxt project and can override or extend the application's behavior.
11+
The [`nuxt.config.ts`](/docs/3.x/guide/directory-structure/nuxt-config) file is located at the root of a Nuxt project and can override or extend the application's behavior.
1212

1313
A minimal configuration file exports the `defineNuxtConfig` function containing an object with your configuration. The `defineNuxtConfig` helper is globally available without import.
1414

@@ -88,7 +88,7 @@ NUXT_API_SECRET=api_secret_token
8888

8989
::
9090

91-
These variables are exposed to the rest of your application using the [`useRuntimeConfig()`](/docs/api/composables/use-runtime-config) composable.
91+
These variables are exposed to the rest of your application using the [`useRuntimeConfig()`](/docs/3.x/api/composables/use-runtime-config) composable.
9292

9393
```vue [pages/index.vue]
9494
<script setup lang="ts">
@@ -116,7 +116,7 @@ export default defineAppConfig({
116116
})
117117
```
118118

119-
These variables are exposed to the rest of your application using the [`useAppConfig`](/docs/api/composables/use-app-config) composable.
119+
These variables are exposed to the rest of your application using the [`useAppConfig`](/docs/3.x/api/composables/use-app-config) composable.
120120

121121
```vue [pages/index.vue]
122122
<script setup lang="ts">
@@ -145,20 +145,20 @@ Non primitive JS types | ❌ No | ✅ Yes
145145

146146
## External Configuration Files
147147

148-
Nuxt uses [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file as the single source of truth for configurations and skips reading external configuration files. During the course of building your project, you may have a need to configure those. The following table highlights common configurations and, where applicable, how they can be configured with Nuxt.
148+
Nuxt uses [`nuxt.config.ts`](/docs/3.x/guide/directory-structure/nuxt-config) file as the single source of truth for configurations and skips reading external configuration files. During the course of building your project, you may have a need to configure those. The following table highlights common configurations and, where applicable, how they can be configured with Nuxt.
149149

150150
Name | Config File | How To Configure
151151
---------------------------------------------|---------------------------|-------------------------
152-
[Nitro](https://nitro.build) | ~~`nitro.config.ts`~~ | Use [`nitro`](/docs/api/nuxt-config#nitro) key in `nuxt.config`
153-
[PostCSS](https://postcss.org) | ~~`postcss.config.js`~~ | Use [`postcss`](/docs/api/nuxt-config#postcss) key in `nuxt.config`
154-
[Vite](https://vite.dev) | ~~`vite.config.ts`~~ | Use [`vite`](/docs/api/nuxt-config#vite) key in `nuxt.config`
155-
[webpack](https://webpack.js.org) | ~~`webpack.config.ts`~~ | Use [`webpack`](/docs/api/nuxt-config#webpack-1) key in `nuxt.config`
152+
[Nitro](https://nitro.build) | ~~`nitro.config.ts`~~ | Use [`nitro`](/docs/3.x/api/nuxt-config#nitro) key in `nuxt.config`
153+
[PostCSS](https://postcss.org) | ~~`postcss.config.js`~~ | Use [`postcss`](/docs/3.x/api/nuxt-config#postcss) key in `nuxt.config`
154+
[Vite](https://vite.dev) | ~~`vite.config.ts`~~ | Use [`vite`](/docs/3.x/api/nuxt-config#vite) key in `nuxt.config`
155+
[webpack](https://webpack.js.org) | ~~`webpack.config.ts`~~ | Use [`webpack`](/docs/3.x/api/nuxt-config#webpack-1) key in `nuxt.config`
156156

157157
Here is a list of other common config files:
158158

159159
Name | Config File | How To Configure
160160
---------------------------------------------|-------------------------|--------------------------
161-
[TypeScript](https://www.typescriptlang.org) | `tsconfig.json` | [More Info](/docs/guide/concepts/typescript#nuxttsconfigjson)
161+
[TypeScript](https://www.typescriptlang.org) | `tsconfig.json` | [More Info](/docs/3.x/guide/concepts/typescript#nuxttsconfigjson)
162162
[ESLint](https://eslint.org) | `eslint.config.js` | [More Info](https://eslint.org/docs/latest/use/configure/configuration-files)
163163
[Prettier](https://prettier.io) | `prettier.config.js` | [More Info](https://prettier.io/docs/en/configuration.html)
164164
[Stylelint](https://stylelint.io) | `stylelint.config.js` | [More Info](https://stylelint.io/user-guide/configure)

docs/1.getting-started/04.views.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If you are familiar with Vue, you might wonder where `main.js` is (the file that
2626

2727
![Components are reusable pieces of UI](/assets/docs/getting-started/views/components.svg)
2828

29-
Most components are reusable pieces of the user interface, like buttons and menus. In Nuxt, you can create these components in the [`components/`](/docs/guide/directory-structure/components) directory, and they will be automatically available across your application without having to explicitly import them.
29+
Most components are reusable pieces of the user interface, like buttons and menus. In Nuxt, you can create these components in the [`components/`](/docs/3.x/guide/directory-structure/components) directory, and they will be automatically available across your application without having to explicitly import them.
3030

3131
::code-group
3232

@@ -55,9 +55,9 @@ Most components are reusable pieces of the user interface, like buttons and menu
5555

5656
![Pages are views tied to a specific route](/assets/docs/getting-started/views/pages.svg)
5757

58-
Pages represent views for each specific route pattern. Every file in the [`pages/`](/docs/guide/directory-structure/pages) directory represents a different route displaying its content.
58+
Pages represent views for each specific route pattern. Every file in the [`pages/`](/docs/3.x/guide/directory-structure/pages) directory represents a different route displaying its content.
5959

60-
To use pages, create `pages/index.vue` file and add `<NuxtPage />` component to the [`app.vue`](/docs/guide/directory-structure/app) (or remove `app.vue` for default entry). You can now create more pages and their corresponding routes by adding new files in the [`pages/`](/docs/guide/directory-structure/pages) directory.
60+
To use pages, create `pages/index.vue` file and add `<NuxtPage />` component to the [`app.vue`](/docs/3.x/guide/directory-structure/app) (or remove `app.vue` for default entry). You can now create more pages and their corresponding routes by adding new files in the [`pages/`](/docs/3.x/guide/directory-structure/pages) directory.
6161

6262
::code-group
6363

@@ -91,7 +91,7 @@ To use pages, create `pages/index.vue` file and add `<NuxtPage />` component to
9191
Layouts are wrappers around pages that contain a common User Interface for several pages, such as header and footer displays. Layouts are Vue files using `<slot />` components to display the **page** content. The `layouts/default.vue` file will be used by default. Custom layouts can be set as part of your page metadata.
9292

9393
::note
94-
If you only have a single layout in your application, we recommend using [`app.vue`](/docs/guide/directory-structure/app) with [`<NuxtPage />`](/docs/api/components/nuxt-page) instead.
94+
If you only have a single layout in your application, we recommend using [`app.vue`](/docs/3.x/guide/directory-structure/app) with [`<NuxtPage />`](/docs/3.x/api/components/nuxt-page) instead.
9595
::
9696

9797
::code-group
@@ -137,12 +137,12 @@ If you only have a single layout in your application, we recommend using [`app.v
137137

138138
::
139139

140-
If you want to create more layouts and learn how to use them in your pages, find more information in the [Layouts section](/docs/guide/directory-structure/layouts).
140+
If you want to create more layouts and learn how to use them in your pages, find more information in the [Layouts section](/docs/3.x/guide/directory-structure/layouts).
141141

142142
## Advanced: Extending the HTML Template
143143

144144
::note
145-
If you only need to modify the `<head>`, you can refer to the [SEO and meta section](/docs/getting-started/seo-meta).
145+
If you only need to modify the `<head>`, you can refer to the [SEO and meta section](/docs/3.x/getting-started/seo-meta).
146146
::
147147

148148
You can have full control over the HTML template by adding a Nitro plugin that registers a hook.

docs/1.getting-started/05.assets.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ navigation.icon: i-lucide-image
66

77
Nuxt uses two directories to handle assets like stylesheets, fonts or images.
88

9-
- The [`public/`](/docs/guide/directory-structure/public) directory content is served at the server root as-is.
10-
- The [`assets/`](/docs/guide/directory-structure/assets) directory contains by convention every asset that you want the build tool (Vite or webpack) to process.
9+
- The [`public/`](/docs/3.x/guide/directory-structure/public) directory content is served at the server root as-is.
10+
- The [`assets/`](/docs/3.x/guide/directory-structure/assets) directory contains by convention every asset that you want the build tool (Vite or webpack) to process.
1111

1212
## Public Directory
1313

14-
The [`public/`](/docs/guide/directory-structure/public) directory is used as a public server for static assets publicly available at a defined URL of your application.
14+
The [`public/`](/docs/3.x/guide/directory-structure/public) directory is used as a public server for static assets publicly available at a defined URL of your application.
1515

16-
You can get a file in the [`public/`](/docs/guide/directory-structure/public) directory from your application's code or from a browser by the root URL `/`.
16+
You can get a file in the [`public/`](/docs/3.x/guide/directory-structure/public) directory from your application's code or from a browser by the root URL `/`.
1717

1818
### Example
1919

@@ -29,9 +29,9 @@ For example, referencing an image file in the `public/img/` directory, available
2929

3030
Nuxt uses [Vite](https://vite.dev/guide/assets.html) (default) or [webpack](https://webpack.js.org/guides/asset-management) to build and bundle your application. The main function of these build tools is to process JavaScript files, but they can be extended through [plugins](https://vite.dev/plugins) (for Vite) or [loaders](https://webpack.js.org/loaders) (for webpack) to process other kinds of assets, like stylesheets, fonts or SVGs. This step transforms the original file, mainly for performance or caching purposes (such as stylesheet minification or browser cache invalidation).
3131

32-
By convention, Nuxt uses the [`assets/`](/docs/guide/directory-structure/assets) directory to store these files but there is no auto-scan functionality for this directory, and you can use any other name for it.
32+
By convention, Nuxt uses the [`assets/`](/docs/3.x/guide/directory-structure/assets) directory to store these files but there is no auto-scan functionality for this directory, and you can use any other name for it.
3333

34-
In your application's code, you can reference a file located in the [`assets/`](/docs/guide/directory-structure/assets) directory by using the `~/assets/` path.
34+
In your application's code, you can reference a file located in the [`assets/`](/docs/3.x/guide/directory-structure/assets) directory by using the `~/assets/` path.
3535

3636
### Example
3737

@@ -44,5 +44,5 @@ For example, referencing an image file that will be processed if a build tool is
4444
```
4545

4646
::note
47-
Nuxt won't serve files in the [`assets/`](/docs/guide/directory-structure/assets) directory at a static URL like `/assets/my-file.png`. If you need a static URL, use the [`public/`](#public-directory) directory.
47+
Nuxt won't serve files in the [`assets/`](/docs/3.x/guide/directory-structure/assets) directory at a static URL like `/assets/my-file.png`. If you need a static URL, use the [`public/`](#public-directory) directory.
4848
::

docs/1.getting-started/06.styling.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can use CSS preprocessors, CSS frameworks, UI libraries and Nuxt modules to
99

1010
## Local Stylesheets
1111

12-
If you're writing local stylesheets, the natural place to put them is the [`assets/` directory](/docs/guide/directory-structure/assets).
12+
If you're writing local stylesheets, the natural place to put them is the [`assets/` directory](/docs/3.x/guide/directory-structure/assets).
1313

1414
### Importing Within Components
1515

@@ -37,7 +37,7 @@ The stylesheets will be inlined in the HTML rendered by Nuxt.
3737
### The CSS Property
3838

3939
You can also use the `css` property in the Nuxt configuration.
40-
The natural place for your stylesheets is the [`assets/` directory](/docs/guide/directory-structure/assets). You can then reference its path and Nuxt will include it to all the pages of your application.
40+
The natural place for your stylesheets is the [`assets/` directory](/docs/3.x/guide/directory-structure/assets). You can then reference its path and Nuxt will include it to all the pages of your application.
4141

4242
```ts [nuxt.config.ts]
4343
export default defineNuxtConfig({
@@ -121,7 +121,7 @@ export default defineNuxtConfig({
121121

122122
You can include external stylesheets in your application by adding a link element in the head section of your nuxt.config file. You can achieve this result using different methods. Note that local stylesheets can also be included this way.
123123

124-
You can manipulate the head with the [`app.head`](/docs/api/nuxt-config#head) property of your Nuxt configuration:
124+
You can manipulate the head with the [`app.head`](/docs/3.x/api/nuxt-config#head) property of your Nuxt configuration:
125125

126126
```ts twoslash [nuxt.config.ts]
127127
export default defineNuxtConfig({
@@ -507,7 +507,7 @@ Here are a few modules to help you get started:
507507
- [Nuxt UI](https://ui.nuxt.com): A UI Library for Modern Web Apps
508508
- [Panda CSS](https://panda-css.com/docs/installation/nuxt): CSS-in-JS engine that generates atomic CSS at build time
509509

510-
Nuxt modules provide you with a good developer experience out of the box, but remember that if your favorite tool doesn't have a module, it doesn't mean that you can't use it with Nuxt! You can configure it yourself for your own project. Depending on the tool, you might need to use a [Nuxt plugin](/docs/guide/directory-structure/plugins) and/or [make your own module](/docs/guide/going-further/modules). Share them with the [community](/modules) if you do!
510+
Nuxt modules provide you with a good developer experience out of the box, but remember that if your favorite tool doesn't have a module, it doesn't mean that you can't use it with Nuxt! You can configure it yourself for your own project. Depending on the tool, you might need to use a [Nuxt plugin](/docs/3.x/guide/directory-structure/plugins) and/or [make your own module](/docs/3.x/guide/going-further/modules). Share them with the [community](/modules) if you do!
511511

512512
### Easily Load Webfonts
513513

@@ -519,7 +519,7 @@ If you are using [UnoCSS](https://unocss.dev/integrations/nuxt), note that it co
519519

520520
### Transitions
521521

522-
Nuxt comes with the same `<Transition>` element that Vue has, and also has support for the experimental [View Transitions API](/docs/getting-started/transitions#view-transitions-api-experimental).
522+
Nuxt comes with the same `<Transition>` element that Vue has, and also has support for the experimental [View Transitions API](/docs/3.x/getting-started/transitions#view-transitions-api-experimental).
523523

524524
:read-more{to="/docs/getting-started/transitions"}
525525

0 commit comments

Comments
 (0)