Nuxt Content 3 migration #12
@ -7,9 +7,6 @@ import type { BlogParsedContent } from "@/shared/types";
|
|||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(tz);
|
dayjs.extend(tz);
|
||||||
|
|
||||||
// TODO: make queryContent async so it doesn't delay
|
|
||||||
// execution of the template
|
|
||||||
|
|
||||||
const docs = await queryContent<BlogParsedContent>("/blog")
|
const docs = await queryContent<BlogParsedContent>("/blog")
|
||||||
.sort({ date: 1 })
|
.sort({ date: 1 })
|
||||||
.where({ _draft: false })
|
.where({ _draft: false })
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import dayjs from "dayjs";
|
|
||||||
import utc from "dayjs/plugin/utc.js";
|
|
||||||
import tz from "dayjs/plugin/timezone.js";
|
|
||||||
import type { GithubCommit, GithubPushEvent } from "@/shared/github";
|
import type { GithubCommit, GithubPushEvent } from "@/shared/github";
|
||||||
import type { Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// this is in /components so i can import the thing
|
|
||||||
useHead({ title: "Eggworld" });
|
useHead({ title: "Eggworld" });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import type { StoryParsedContent } from "@/shared/types";
|
||||||
|
|
||||||
useTitle("Stories");
|
useTitle("Stories");
|
||||||
|
|
||||||
|
const docs = await queryContent<StoryParsedContent>("/stories")
|
||||||
|
.sort({ date: 1 })
|
||||||
|
.where({ _draft: false })
|
||||||
|
.find();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<main class="flex grow">hello</main>
|
<main class="flex grow prose dark:prose-invert">
|
||||||
|
<h1>Stories</h1>
|
||||||
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user