init blog (wip)

This commit is contained in:
Hans Pagel
2021-07-09 18:24:23 +02:00
parent 1b7ef80603
commit 2e40a827fb
17 changed files with 748 additions and 6 deletions

68
docs/src/pages/blog.vue Normal file
View File

@@ -0,0 +1,68 @@
<template>
<Layout :show-sidebar="false">
<app-section>
<div class="text">
<PostPreview
v-for="edge in $page.posts.edges"
:key="edge.node.id"
:title="edge.node.title"
:published-at="edge.node.published_at"
:teaser="edge.node.teaser"
:link="edge.node.path"
:author="edge.node.author"
/>
</div>
</app-section>
</Layout>
</template>
<page-query>
query {
posts: allPost(sortBy: "published_at", order: DESC) {
edges {
node {
id
title
teaser
published_at
author
path
}
}
}
}
</page-query>
<script>
import AppSection from '@/components/AppSection'
import PostPreview from '@/components/PostPreview'
export default {
metaInfo() {
return {
title: 'Blog',
meta: [
{
property: 'og:title',
content: 'tiptap',
},
{
name: 'description',
content: 'The headless editor framework for web artisans.',
},
{
property: 'og:description',
content: 'The headless editor framework for web artisans.',
},
],
}
},
components: {
AppSection,
PostPreview,
},
}
</script>