Fallback to 404 page when not-found slot doesn't exist
Is your feature request related to a problem? Please describe
When using <ContentDoc /> to render markdown, but neither the md file nor the not-found slot exists, a prompt asking to use the not-found slot is displayed. This makes user-defined 404 pages not used as expected at all.
Describe the solution you'd like
There is no not-found slot, but if the user has defined a 404 page, it will fall back to the 404 page first. Instead of directly showing a prompt asking the user to use the slot.
Describe alternatives you've considered
Additional context
Do you by any chance have a catch-all route, such as pages/[...slug].vue? If so, that's what's causing the ~/error.vue to not be used, it takes precedence. In such a case, you could try and reorganize your catch-all route, for example do this instead:
pages/
--| about.vue
--| posts/
----| [slug].vue
----| index.vue
error.vue
Do you by any chance have a catch-all route, such as
pages/[...slug].vue? If so, that's what's causing the~/error.vueto not be used, it takes precedence. In such a case, you could try and reorganize your catch-all route, for example do this instead:pages/ --| about.vue --| posts/ ----| [slug].vue ----| index.vue error.vue
That did the trick, thank you!
I'd love to add that to the docs... but where? Maybe: https://content.nuxtjs.org/api/components/content-doc#slots ?
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.