chore: clean up parsedcontent types
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import type { BlogParsedContent, StoryParsedContent } from "@/shared/types";
|
||||
import type { AnyParsedContent } from "@/shared/types";
|
||||
import { calcReadingTime } from "@/shared/metadata";
|
||||
|
||||
type GeneralParsedContent = BlogParsedContent | StoryParsedContent;
|
||||
|
||||
const route = useRoute();
|
||||
// definePageMeta({
|
||||
// layout: "withtop",
|
||||
// });
|
||||
|
||||
// we're not using ContentDoc because i need control
|
||||
const doc = await queryContent<GeneralParsedContent>(route.path).findOne();
|
||||
const doc = await queryContent<AnyParsedContent>(route.path).findOne();
|
||||
const type = route.path.startsWith("/stories")
|
||||
? "stories"
|
||||
: route.path.startsWith("/blog")
|
||||
|
Reference in New Issue
Block a user