mirror of
https://github.com/jaronpate/folio.git
synced 2026-10-19 01:07:39 +00:00
22 lines
479 B
Vue
22 lines
479 B
Vue
<script lang="ts" setup>
|
|
const route = useRoute();
|
|
const { data: page } = await useAsyncData(route.path, () => {
|
|
return queryCollection('writing').path(route.path).first();
|
|
});
|
|
|
|
if (!page.value) {
|
|
throw createError({ statusCode: 404, statusMessage: 'Page Not Found' });
|
|
}
|
|
|
|
useSeoMeta({
|
|
title: page.value?.title,
|
|
description: page.value?.description,
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<ContentRenderer v-if="page" :value="page" />
|
|
</div>
|
|
</template>
|