I have a folder structure in my nuxt project like this:
...
/pages/_slug.vue
/content
/report
page1.json
/doc
page2.json
In my pages folder I have a _slug.vue file
<template>
<div>{{ profile.hello }}</div>
</template>
<script>
export default {
async asyncData ({ $content, params }) {
const profile = await $content('report', params.slug, { deep: true }).fetch()
return { profile }
}
}
</script>
When I visit /page1 all works fine, however when I request /doc/page2 no page is being rendered. Now I am confused since I added { deep:true } to achieve this behavior but this doesn't work. How can I make sure that the folder structure resembles my routes?
params.slugwhen you're on/doc/page2? Should it be'page2'or'/doc/page2'?