feat: added nuxt content

This commit is contained in:
Jaron
2026-04-29 23:06:11 -05:00
parent 3e79461faa
commit 846ebb44c9
11 changed files with 824 additions and 40 deletions
+21
View File
@@ -0,0 +1,21 @@
<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>
+15
View File
@@ -0,0 +1,15 @@
<script setup lang="ts">
const { data: home } = await useAsyncData(() =>
queryCollection('writing').path('/writing').first(),
);
useSeoMeta({
title: home.value?.title,
description: home.value?.description,
});
</script>
<template>
<ContentRenderer v-if="home" :value="home" />
<div v-else>Home not found</div>
</template>