File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,19 @@ const route = useRoute()
55const { data : page } = await useAsyncData (' page-' + route .path , () => {
66 return queryCollection (' content' ).path (route .path ).first ()
77})
8-
9- if (! page .value ) {
10- throw createError ({ statusCode: 404 , statusMessage: ' Page not found' , fatal: true })
11- }
128 </script >
139
1410<template >
1511 <div class =" overflow-y-auto " >
16- <ContentRenderer
17- v-if =" page"
18- :value =" page"
19- />
12+ <template v-if =" page " >
13+ <ContentRenderer :value =" page" />
14+ </template >
15+ <template v-else >
16+ <div class =" empty-page" >
17+ <h1 >Page Not Found</h1 >
18+ <p >Oops! The content you're looking for doesn't exist.</p >
19+ <NuxtLink to =" /" >Go back home</NuxtLink >
20+ </div >
21+ </template >
2022 </div >
2123</template >
You can’t perform that action at this time.
0 commit comments