feat(blog): add tagId and categoryId for multilingual routing support
- Add tagId and categoryId fields to blog post frontmatter and interfaces - Update blog list, category, and tag pages to use IDs for routing - Implement fallback to regular tags/categories when IDs are not available - Improve tag and category links with hover effects and proper encoding - Update post meta component to support multilingual routing
This commit is contained in:
@@ -44,6 +44,9 @@ export interface BlogPost {
|
||||
image: string;
|
||||
slug: string;
|
||||
tags: string[];
|
||||
tagId?: string[];
|
||||
category?: string[];
|
||||
categoryId?: string[];
|
||||
date: string;
|
||||
readTime: string;
|
||||
url?: string;
|
||||
@@ -59,7 +62,9 @@ export interface FrontmatterProps {
|
||||
date?: string; // Alternative field name for publish date
|
||||
author?: string;
|
||||
tags?: string[];
|
||||
tagId?: string[]; // 标签唯一标识符,用于多语言环境下的标签路由
|
||||
category?: string | string[];
|
||||
categoryId?: string[] | string; // 分类唯一标识符,用于多语言环境下的分类路由
|
||||
readingTime?: number;
|
||||
readTime?: string; // Alternative field name for reading time
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user