mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
Replace internal type with external Frontmatter type
This commit is contained in:
@@ -1,14 +1,5 @@
|
|||||||
import type { MarkdownInstance } from "astro";
|
import type { MarkdownInstance } from "astro";
|
||||||
|
import type { Frontmatter } from "./types";
|
||||||
interface Frontmatter {
|
|
||||||
title: string;
|
|
||||||
description: string;
|
|
||||||
author: string;
|
|
||||||
datetime: string;
|
|
||||||
slug: string;
|
|
||||||
featured: boolean;
|
|
||||||
tags: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
const getSortedPosts = (posts: MarkdownInstance<Frontmatter>[]) =>
|
const getSortedPosts = (posts: MarkdownInstance<Frontmatter>[]) =>
|
||||||
posts.sort(
|
posts.sort(
|
||||||
|
|||||||
Reference in New Issue
Block a user