Attempt at Markdown page rendering

Syntax highlighting doesn't work yet.
This commit is contained in:
Riyyi
2025-03-29 18:25:38 +01:00
parent 95204ef335
commit d4c487cd92
10 changed files with 710 additions and 45 deletions
+31
View File
@@ -0,0 +1,31 @@
<template>
<div>
<template v-if="article">
<h1>{{ article.title }}</h1>
<p>{{ article.description }}</p>
<ContentRenderer :value="article" />
</template>
<template v-else>
<h1>Page Not Found</h1>
<p>Oops! The content you're looking for doesn't exist.</p>
</template>
</div>
</template>
<script setup lang="ts">
const { params } = useRoute();
console.log(params);
const { data: article } = await useAsyncData(
`article-${params.slug}`,
() => queryCollection("content").path("/articles/" + params.slug).first()
);
useSeoMeta({
title: article.value?.title,
description: article.value?.description
})
console.log(article);
</script>