docs: add link to layers from pages/ docs (#20976)

This commit is contained in:
Paul Grau 2023-05-21 22:42:57 +09:00 committed by GitHub
parent e847e33a75
commit 674607a8a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -361,3 +361,31 @@ function navigate(){
As your app gets bigger and more complex, your routing might require more flexibility. For this reason, Nuxt directly exposes the router, routes and router options for customization in different ways. As your app gets bigger and more complex, your routing might require more flexibility. For this reason, Nuxt directly exposes the router, routes and router options for customization in different ways.
:ReadMore{link="/docs/guide/going-further/custom-routing"} :ReadMore{link="/docs/guide/going-further/custom-routing"}
## Multiple pages directories
By default, all your pages should be in one `pages` directory at the root of your project.
However, you can use Layers to create groupings of your app's pages.
Example:
```bash
-| nuxt.config.ts
-| some-app/
---| nuxt.config.ts
---| pages
-----| app-page.vue
```
```ts
// some-app/nuxt.config.ts
export default defineNuxtConfig({
})
// nuxt.config.ts
export default defineNuxtConfig({
extends: ['./some-app'],
})
```
:ReadMore{link="/docs/guide/going-further/layers"}