I’m trying to build a Nested Page in Nuxt using this guide and this guide and running into a problem
What I want is:
- foobar.com/2021 shows me the parent page for the year
- foobar.com/2021/jun shows me the parent page content for the year + child page for the month
- foobar.com/2021/jun/edit shows me the parent page content for the year + the ‘edit’ child page for that month.
In the above cases, both the ‘2021’ part and the ‘Jun’ part will be dynamic
The problem:
I can get the first 2 to work but the not the edit route. This is what works currently:
/pages
_year.vue
_year/
_month.vue
index.vue
It’s demonstrated in this codesandbox here
What I’ve tried to get the edit route to work:
Add a _child
folder under _year
, right alongside _child.vue
Add a edit.vue
there (didnt work)
Add a index.vue
in addition (didnt work)
Rename the edit.vue
to _edit.vue
(didn’t work)
Is this something that’s feasible with automatic routing in Nuxt?