docs: add a tip for `appLayout` · nuxt/nuxt@beda479

File tree

1 file changed

lines changed

  • docs/2.directory-structure/1.app

1 file changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -156,10 +156,16 @@ export default defineNuxtConfig({

156156

'/admin': { appLayout: 'admin' },

157157

// Set layout for multiple routes

158158

'/dashboard/**': { appLayout: 'dashboard' },

159+

// Disable layout for a route

160+

'/landing': { appLayout: false },

159161

},

160162

})

161163

```

162164
165+

::tip

166+

This is useful when you want to manage layouts centrally in your configuration rather than in each page file, or when you need to apply layouts to routes that don't have corresponding page components (such as catchall pages which might match many paths).

167+

::

168+
163169

:link-example{to="/docs/4.x/examples/features/layouts"}

164170
165171

## Overriding a Layout on a Per-page Basis