NuxtN
Nuxt2y ago
10 replies
Zampa

Get dynamic array of page names in Nuxt application

I have a scenario where I'd like to add a middleware that references an array of all the page names that exist at the root of the application (i.e. /user, /faq, /about, etc.).

Rather than hardcode an array of all those names ['user', 'faq', 'about'], is there some way via Nitro or Nuxt to parse/call to get all the page names that exist within the current Nuxt application?
Was this page helpful?