2024-09-26 16:48:47 +08:00
|
|
|
import type { TPostFrontmatter } from "./frontmatter.type";
|
|
|
|
|
|
|
|
|
|
export type TPostListItem = {
|
|
|
|
|
id: string;
|
|
|
|
|
frontMatter: TPostFrontmatter;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type TPostsByTag = {
|
|
|
|
|
[tagName: string]: TPostListItem[];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type TSearchResultItem = {
|
|
|
|
|
id: string;
|
|
|
|
|
title: string;
|
|
|
|
|
summary: string | null;
|
|
|
|
|
tags: string[] | null;
|
|
|
|
|
};
|
|
|
|
|
|
2024-09-28 00:18:55 +08:00
|
|
|
export type TPostTOCItem = {
|
2024-09-26 16:48:47 +08:00
|
|
|
level: number;
|
|
|
|
|
title: string;
|
|
|
|
|
anchorId: string;
|
|
|
|
|
};
|
2024-09-28 00:18:55 +08:00
|
|
|
|
|
|
|
|
export type TPostFrontmatter = {
|
|
|
|
|
title: string;
|
|
|
|
|
time: string;
|
|
|
|
|
tags: string[] | null;
|
|
|
|
|
subtitle: string | null;
|
|
|
|
|
summary: string | null;
|
|
|
|
|
coverURL: string | null;
|
|
|
|
|
pin: boolean | null;
|
|
|
|
|
noPrompt: boolean | null;
|
|
|
|
|
allowShare: boolean | null;
|
|
|
|
|
closed: boolean | null;
|
|
|
|
|
};
|
2024-09-28 00:40:14 +08:00
|
|
|
|
|
|
|
|
export type TTagListItem = { name: string; count: number };
|