feat: 新增分类

This commit is contained in:
KazooTTT
2025-02-05 21:30:41 +08:00
parent 1f239d3205
commit fc91e1e390
12 changed files with 323 additions and 108 deletions

View File

@ -19,6 +19,7 @@ const {
date_modified: updatedDate,
date: publishDate,
tags,
category,
} = post.data;
const socialImage = ogImage ?? `/og-image/${post.id}.png`;
const articleDate = updatedDate?.toISOString() ?? publishDate.toISOString();
@ -32,7 +33,7 @@ const readingTime: string = remarkPluginFrontmatter.readingTime;
description: description ?? "",
ogImage: socialImage,
title,
tags: tags.join(", "),
tags: [category, ...tags].join(", "),
}}
>
<article class="grow break-words" data-pagefind-body>