add: content-pages plugin
This commit is contained in:
parent
f5fa5b2971
commit
03c36844e5
5 changed files with 42 additions and 1 deletions
19
app/pages/wissen/[slug].vue
Normal file
19
app/pages/wissen/[slug].vue
Normal file
|
@ -0,0 +1,19 @@
|
|||
<script lang="ts" setup>
|
||||
const slug = useRoute().params.slug
|
||||
const { data: post } = await useAsyncData(`wissen-${slug}`, () => {
|
||||
return queryCollection('wissen').path(`/wissen/${slug}`).first()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<template v-if="post">
|
||||
<ContentRenderer :value="post" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<section class="Legal flex-col gap-default content full">
|
||||
<h1>Page Not Found</h1>
|
||||
<p>Oops! The content you're looking for doesn't exist.</p>
|
||||
<NuxtLink to="/">Go back home</NuxtLink>
|
||||
</section>
|
||||
</template>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue