https://nuxt.com/docs/guide/directory-structure/pages#nested-routes
위 Nuxt 공식 문서를 기반으로 작성하였습니다
Nuxt는 파일 기반 라우팅이 이루어진다고 배웠습니다. 예시로,
아래와 같은 페이지 구조는
-| pages/
---| parent/
------| child.vue
---| parent.vue
아래와 같은 라우트 정보로 생성됩니다.
[
{
path: '/parent',
component: '~/pages/parent.vue',
name: 'parent',
children: [
{
path: 'child',
component: '~/pages/parent/child.vue',
name: 'parent-child'
}
]
}
]

pages 디렉토리 구조가 위와 같을 때,
<template>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>
<script setup lang="ts"></script>
이때, course 디렉토리 하위의 index.vue를 찾게 되고 없으면 렌더링되지 않습니다.