1
0
Fork 0
gaiety-life/src/pages/Index.vue

55 lines
906 B
Vue

<template>
<Layout :show-logo="false">
<!-- Author intro -->
<Author :show-title="true" />
<!-- List posts -->
<div class="posts">
<PostCard v-for="edge in $page.posts.edges" :key="edge.node.id" :post="edge.node"/>
</div>
</Layout>
</template>
<page-query>
{
posts: allPost {
edges {
node {
id
title
path
tags {
id
title
path
}
date (format: "D. MMMM YYYY")
timeToRead
description
coverImage (width: 770, height: 380, blur: 10)
...on Post {
id
title
path
}
}
}
}
}
</page-query>
<script>
import Author from '~/components/Author.vue'
import PostCard from '~/components/PostCard.vue'
export default {
components: {
Author,
PostCard
},
metaInfo: {
title: 'Home'
}
}
</script>