@@ -171,7 +171,7 @@ const pageDescription = `Explore articles about ${formattedCategory}. Dive into
{tags.map((tag) => (
-
{tag}
diff --git a/src/pages/blog/posts/modern-ui-tailwind.md b/src/pages/blog/posts/modern-ui-tailwind.md
index e78cc13..697c643 100644
--- a/src/pages/blog/posts/modern-ui-tailwind.md
+++ b/src/pages/blog/posts/modern-ui-tailwind.md
@@ -4,7 +4,7 @@ description: "Discover how to create beautiful, responsive user interfaces using
image: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&h=250&fit=crop&crop=center"
date: "April 15, 2025"
readTime: "6 min read"
-tags: ["CSS", "Tailwind", "UI/UX"]
+tags: ["CSS", "Tailwind", "UI"]
slug: "modern-ui-tailwind"
layout: "../../../layouts/BlogPostLayout.astro"
---
diff --git a/src/pages/blog/tags/[tag].astro b/src/pages/blog/tags/[tag].astro
index 0f3ff70..a044c36 100644
--- a/src/pages/blog/tags/[tag].astro
+++ b/src/pages/blog/tags/[tag].astro
@@ -20,9 +20,9 @@ export async function getStaticPaths() {
}
});
- // 为每个标签生成路径
+ // 为每个标签生成路径,对包含特殊字符的标签进行编码
return Array.from(uniqueTags).map(tag => ({
- params: { tag },
+ params: { tag: encodeURIComponent(tag) },
props: { tag }
}));
}
@@ -166,7 +166,7 @@ const pageDescription = `Explore articles tagged with #${formattedTag}. Dive int
const tagName = tagItem.slice(1).toLowerCase();
const isCurrentTag = tagName === decodedTag.toLowerCase();
return (
-
{tagItem}
diff --git a/src/pages/zh/blog/categories/[category].astro b/src/pages/zh/blog/categories/[category].astro
index 4fdc87c..2372856 100644
--- a/src/pages/zh/blog/categories/[category].astro
+++ b/src/pages/zh/blog/categories/[category].astro
@@ -26,7 +26,7 @@ export async function getStaticPaths() {
// 为每个分类生成路径
return Array.from(uniqueCategories).map(category => ({
- params: { category },
+ params: { category: encodeURIComponent(category) },
props: { category }
}));
}
@@ -153,7 +153,7 @@ const pageDescription = `探索关于${formattedCategory}的文章。深入了
{categories.map((cat) => (
-
{cat}
@@ -171,7 +171,7 @@ const pageDescription = `探索关于${formattedCategory}的文章。深入了
{tags.map((tag) => (
-
{tag}
diff --git a/src/pages/zh/blog/posts/modern-ui-tailwind.md b/src/pages/zh/blog/posts/modern-ui-tailwind.md
index e04d1c3..7e12689 100644
--- a/src/pages/zh/blog/posts/modern-ui-tailwind.md
+++ b/src/pages/zh/blog/posts/modern-ui-tailwind.md
@@ -4,7 +4,7 @@ description: "探索如何使用 Tailwind CSS 创建美观、响应式的用户
image: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&h=250&fit=crop&crop=center"
date: "2025年4月20日"
readTime: "6分钟阅读"
-tags: ["CSS", "Tailwind", "UI/UX"]
+tags: ["CSS", "Tailwind", "UI"]
slug: "modern-ui-tailwind"
layout: "../../../../layouts/BlogPostLayout.astro"
---
diff --git a/src/pages/zh/blog/tags/[tag].astro b/src/pages/zh/blog/tags/[tag].astro
index e0e108d..21c0820 100644
--- a/src/pages/zh/blog/tags/[tag].astro
+++ b/src/pages/zh/blog/tags/[tag].astro
@@ -20,9 +20,9 @@ export async function getStaticPaths() {
}
});
- // 为每个标签生成路径
+ // 为每个标签生成路径,对包含特殊字符的标签进行编码
return Array.from(uniqueTags).map(tag => ({
- params: { tag },
+ params: { tag: encodeURIComponent(tag) },
props: { tag }
}));
}
@@ -166,7 +166,7 @@ const pageDescription = `浏览带有 #${formattedTag} 标签的文章。深入
const tagName = tagItem.slice(1).toLowerCase();
const isCurrentTag = tagName === decodedTag.toLowerCase();
return (
-
{tagItem}