refactor(blog): update blog post layouts and remove index pages

- Replace BlogLayout with new BlogPostLayout for better post styling
- Remove unused blog post index pages
- Add new blog post layout with enhanced typography and metadata
This commit is contained in:
joyzhao
2025-06-16 22:30:40 +08:00
parent 70b6a27021
commit d22174e0dc
12 changed files with 134 additions and 57 deletions

View File

@@ -1,22 +0,0 @@
---
import BlogLayout from '../../../../layouts/BlogLayout.astro';
import type { Lang } from '../../../../i18n/utils';
const lang = (Astro.currentLocale || 'zh') as Lang;
---
<BlogLayout title="博客文章">
<div class="container mx-auto px-4 py-8">
<h1 class="text-4xl font-bold text-center mb-8">所有博客文章</h1>
<p class="text-center text-muted-foreground mb-8">
浏览按分类和主题组织的所有博客文章。
</p>
<!-- 此页面可用于其他博客组织功能 -->
<div class="text-center">
<a href="/zh/blog" class="text-primary hover:underline">
← 返回博客首页
</a>
</div>
</div>
</BlogLayout>

View File

@@ -6,7 +6,7 @@ date: "2025年5月10日"
readTime: "5分钟阅读"
tags: ["React", "JavaScript", "前端"]
slug: "mastering-react-hooks"
layout: "../../../../layouts/BlogLayout.astro"
layout: "../../../../layouts/BlogPostLayout.astro"
---
# 精通 React Hooks深入探索

View File

@@ -6,7 +6,7 @@ date: "2025年4月20日"
readTime: "6分钟阅读"
tags: ["CSS", "Tailwind", "UI/UX"]
slug: "modern-ui-tailwind"
layout: "../../../../layouts/BlogLayout.astro"
layout: "../../../../layouts/BlogPostLayout.astro"
---
# 使用 Tailwind CSS 构建现代 UI

View File

@@ -6,7 +6,7 @@ date: "2025年4月25日"
readTime: "7分钟阅读"
tags: ["Node.js", "Docker", "DevOps"]
slug: "scaling-nodejs-docker"
layout: "../../../../layouts/BlogLayout.astro"
layout: "../../../../layouts/BlogPostLayout.astro"
---
# 使用 Docker 扩展 Node.js 应用

View File

@@ -6,7 +6,7 @@ date: "2025年4月15日"
readTime: "8分钟阅读"
tags: ["TypeScript", "架构", "最佳实践"]
slug: "typescript-best-practices"
layout: "../../../../layouts/BlogLayout.astro"
layout: "../../../../layouts/BlogPostLayout.astro"
---
# TypeScript 在大型项目中的最佳实践