feat: add tag navigation

This commit is contained in:
2022-08-10 16:31:25 -04:00
parent 3a40c63d5e
commit ff1fc96a5c
17 changed files with 373 additions and 127 deletions

View File

@@ -1,5 +1,25 @@
<script setup lang="ts">
import type { BlogParsedContent } from "@/shared/types";
useTitle("Blog");
// TODO: paginate stories
const docs = await queryContent<BlogParsedContent>("/blog")
.sort({ date: -1 })
.where({ _draft: false })
.find();
</script>
<template></template>
<template>
<main
class="flex flex-col grow prose dark:prose-invert max-w-3xl gap-6 transition"
>
<h1 class="mb-0">Blog</h1>
<PostPreviewCard
v-for="(post, index) in docs"
:key="index"
:post="post"
type="blog"
/>
</main>
</template>