We have seen how this works with dynamic routes and nested routes, respectively, so theoretically and technically, it is possible to combine these two options to create dynamic nested routes by having dynamic children (for example, _subTopic) in dynamic parents (for example, _topic). This is best illustrated in the following example structure:
pages/
--| _topic/
-----| _subTopic/
--------| _slug.vue
--------| index.vue
-----| _subTopic.vue
-----| index.vue
--| _topic.vue
--| index.vue
Nuxt will automatically generate the following routes:
router: {
routes: [
{
path: '/',
component: 'pages/index.vue',
name: 'index'
},
{
path: '/:topic',
component: 'pages/_topic.vue',
children: [
{
path: '',
component: 'pages/_topic/index.vue',
name: 'topic'
},
{
path: ':subTopic',
component...