mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
Update Frontmatter type from util
This commit is contained in:
+1
-10
@@ -6,16 +6,7 @@ import Footer from "@components/Footer.astro";
|
||||
import LinkButton from "@components/LinkButton.astro";
|
||||
import getSortedPosts from "src/utils/getSortedPosts";
|
||||
import Hr from "@components/Hr.astro";
|
||||
|
||||
export interface Frontmatter {
|
||||
title: string;
|
||||
description: string;
|
||||
author: string;
|
||||
datetime: string;
|
||||
slug: string;
|
||||
featured: boolean;
|
||||
tags: string[];
|
||||
}
|
||||
import type { Frontmatter } from "src/utils/types";
|
||||
|
||||
const posts = await Astro.glob<Frontmatter>("../contents/*.md");
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import Footer from "@components/Footer.astro";
|
||||
import Datetime from "@components/Datetime.astro";
|
||||
import Tag from "@components/Tag.astro";
|
||||
import type { MarkdownInstance } from "astro";
|
||||
import type { Frontmatter } from "../index.astro";
|
||||
import type { Frontmatter } from "src/utils/types";
|
||||
|
||||
export interface Props {
|
||||
post: MarkdownInstance<Frontmatter>;
|
||||
|
||||
@@ -4,8 +4,8 @@ import Header from "@components/Header.astro";
|
||||
import Footer from "@components/Footer.astro";
|
||||
import Main from "@layouts/Main.astro";
|
||||
import Card from "@components/Card.astro";
|
||||
import type { Frontmatter } from "../index.astro";
|
||||
import getSortedPosts from "src/utils/getSortedPosts";
|
||||
import type { Frontmatter } from "src/utils/types";
|
||||
|
||||
const posts = await Astro.glob<Frontmatter>("../../contents/*.md");
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import Tag from "@components/Tag.astro";
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import Main from "@layouts/Main.astro";
|
||||
import getUniqueTags from "src/utils/getUniqueTags";
|
||||
import type { Frontmatter } from "./index.astro";
|
||||
import type { Frontmatter } from "src/utils/types";
|
||||
|
||||
const posts = await Astro.glob<Frontmatter>("../contents/*.md");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user