评论区 侧边栏

This commit is contained in:
2026-06-18 16:03:38 +08:00 Unverified
parent ebaf187d89
commit ce4a201508
6 changed files with 368 additions and 7 deletions
+2
View File
@@ -13,6 +13,7 @@ export type BlogPost = MarkdownModule & {
tags: string[];
categories: string[];
summary: string;
comments: boolean;
cover?: string;
href: string;
};
@@ -80,6 +81,7 @@ export function getAllPosts(): BlogPost[] {
tags: asArray(module.frontmatter.tags),
categories: asArray(module.frontmatter.categories),
summary: makeSummary(module),
comments: module.frontmatter.comments !== false,
cover: typeof module.frontmatter.cover === 'string' ? module.frontmatter.cover : undefined,
href: `/posts/${slug}/`,
};