Migrate to nuxt content v3. Change articles layout.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import type { ParsedContent } from "@nuxt/content/dist/runtime/types";
|
||||
import { formatDate } from "@vueuse/core";
|
||||
|
||||
interface Props {
|
||||
article: ParsedContent;
|
||||
article: any;
|
||||
}
|
||||
|
||||
const { article } = defineProps<Props>();
|
||||
@@ -10,8 +10,10 @@ const date = useDateFormat(article.date, "Do of MMMM YYYY");
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ULink class="font-semibold hover:underline" :to="article._path">{{
|
||||
<ULink class="font-semibold hover:underline" :to="article.path">{{
|
||||
article.title
|
||||
}}</ULink>
|
||||
<div class="text-xs text-slate-500">{{ date }}</div>
|
||||
<div class="text-xs text-slate-500">
|
||||
{{ date }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user