Building phase one
This commit is contained in:
18
template/app/pages/[...slug].vue
Normal file
18
template/app/pages/[...slug].vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
const route = useRoute()
|
||||
|
||||
const { data: page } = await useAsyncData('page-' + route.path, () => {
|
||||
return queryCollection('content').path(route.path).first()
|
||||
})
|
||||
|
||||
if (!page.value) {
|
||||
useHead({ title: 'Page not found', meta: [{ name: 'robots', content: 'noindex' }] })
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="prose-wrapper" v-if="page">
|
||||
<ContentRenderer :value="page" />
|
||||
</div>
|
||||
<NotFound />
|
||||
</template>
|
||||
Reference in New Issue
Block a user