mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-20 07:30:57 +00:00
docs: add link to layers from pages/
docs (#20976)
This commit is contained in:
parent
e847e33a75
commit
674607a8a3
@ -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.
|
||||
|
||||
: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"}
|
||||
|
Loading…
Reference in New Issue
Block a user