2022-10-16 09:37:13 +00:00
|
|
|
<template>
|
|
|
|
<NuxtLayout name="blog">
|
|
|
|
<template v-for="post of posts">
|
|
|
|
<BlogPost :post="post" :detail="false" />
|
|
|
|
</template>
|
|
|
|
</NuxtLayout>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2022-12-04 10:12:29 +00:00
|
|
|
import type { BlogPost } from '~~/lib/types/post';
|
|
|
|
|
|
|
|
const { data: posts } = await useFetch<BlogPost[]>('/api/blog', {
|
2022-10-16 13:28:47 +00:00
|
|
|
key: 'frontpage',
|
2022-10-20 18:52:42 +00:00
|
|
|
params: { limit: 16, render: false },
|
2022-10-16 13:28:47 +00:00
|
|
|
});
|
2022-10-16 09:37:13 +00:00
|
|
|
</script>
|