1
0
Fork 0
ryanmoon.com/pages/blog/.!.index.vue

20 lines
525 B
Vue

<script setup>
const articles = await queryContent('blog')
.sort({ id: -1 })
.where({ id: { $gt: 0 } })
.find()
</script>
<template>
<div class="blog">
<ContentDoc />
<br/>
<div class="card" v-for="article in articles" :id="article.id" :key="article.slug">
<NuxtLink :to="'/blog/' + article.slug" class="title" >
<p>{{ article.title }}</p>
</NuxtLink>
<p class="desc">{{ article.published}} - {{ article.length }} min read</p>
<hr/>
</div>
</div>
</template>