Directory Structure

All named parallel routes page files should be placed in the ~/pages/ directory. Nuxt Pages Plus will process these files and generate parallel routes after Nuxt has generated the routes.

Named Parallel Routes

You can place your parallel routes pages directory file with {route}@{name} format.

File PathNameGenerated routeDescription
index@foo.vuefoo/name in index file
@foo/index.vuefoo/name in root folder
@foo.vuefoo/name in root folder without index
about/us@foo.vuefoo/about/usname in file of folder
about/us@foo/contact.vuefoo/about/us/contactname in sub folder

Nested Named Parallel Routes

Nuxt Pages Plus supports nested name file-based routing, which can be used in nested named parallel routes.

File PathNameGenerated routeDescription
@foo/@bar/about.vuefoo/bar/aboutnested name
about@foo/us@bar.vuefoo/bar/about/usnested name in file and folder
@foo@bar/about.vuefoo/bar/aboutmultiple nested name in folder
about/us@foo@bar.vuefoo/bar/about/usmultiple nested name in file

Escape @ separator

Supporting named parallel views could lead to conflicts with certain routes, e.g. including the @ symbol in the route. Nuxt Pages Plus provided some options to address this problem.

Customize separator symbol

This allows you to use index+foo.vue as Parallel Routes. (Example)

nuxt.config.ts
export default defineNuxtConfig({
  pagesPlus: {
    separator: '+',
  },
})