Skip to content

Commit 996e05a

Browse files
committed
chore: optimize overall project structure and bundle splitting
1 parent ca6bdee commit 996e05a

30 files changed

Lines changed: 2088 additions & 2838 deletions

.github/workflows/deploy.yml

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ concurrency:
1818
jobs:
1919
build:
2020
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
include:
24+
- batch: main
25+
env_mode: main
26+
- batch: zh-variants
27+
env_mode: zh-variants
2128

2229
steps:
2330
- name: 📥 Checkout code
@@ -40,16 +47,59 @@ jobs:
4047
- name: 📦 Install dependencies
4148
run: pnpm install --frozen-lockfile
4249

43-
- name: 🏗️ Build VitePress
44-
run: pnpm docs:build
50+
- name: 💾 Cache VitePress build
51+
uses: actions/cache@v4
52+
with:
53+
path: docs/.vitepress/cache
54+
key: vitepress-${{ matrix.batch }}-${{ hashFiles('docs/**/*.md') }}
55+
restore-keys: |
56+
vitepress-${{ matrix.batch }}-
57+
58+
- name: Pre-compute article metadata
59+
run: node scripts/precompute-meta.js
60+
61+
- name: "🔨 Build (${{ matrix.batch }})"
62+
run: pnpm exec vitepress build docs
63+
env:
64+
BUILD_MODE: ${{ matrix.env_mode }}
65+
NODE_OPTIONS: --max-old-space-size=4096
66+
67+
- name: 📤 Upload build artifact
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: dist-${{ matrix.batch }}
71+
path: docs/.vitepress/dist${{ matrix.batch == 'zh-variants' && '-zh-variants' || '' }}
4572

46-
- name: 📤 Upload artifact
73+
merge-and-deploy:
74+
needs: build
75+
runs-on: ubuntu-latest
76+
77+
steps:
78+
- name: 📥 Checkout code
79+
uses: actions/checkout@v4
80+
81+
- name: 📥 Download main dist
82+
uses: actions/download-artifact@v4
83+
with:
84+
name: dist-main
85+
path: docs/.vitepress/dist
86+
87+
- name: 📥 Download zh-variants dist
88+
uses: actions/download-artifact@v4
89+
with:
90+
name: dist-zh-variants
91+
path: docs/.vitepress/dist-zh-variants
92+
93+
- name: 🔀 Merge builds
94+
run: node docs/.vitepress/merge-builds.js
95+
96+
- name: 📤 Upload pages artifact
4797
uses: actions/upload-pages-artifact@v3
4898
with:
4999
path: docs/.vitepress/dist
50100

51101
deploy:
52-
needs: build
102+
needs: merge-and-deploy
53103
runs-on: ubuntu-latest
54104
environment:
55105
name: github-pages

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.DS_Store
22
Thumbs.db
33
node_modules/
4+
docs/.vitepress/dist-*/
45
docs/.vitepress/dist/
5-
docs/.vitepress/cache/
6+
docs/.vitepress/cache*/
7+
docs/.vitepress/.temp*/
68
*.log

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# Allow esbuild to run its postinstall script
22
onlyBuiltDependencies[]=esbuild
3+
# Optimize pnpm install speed
4+
prefer-frozen-lockfile=true

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cSpell.words": ["vitepress"]
3+
}

README.en.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Frontend Growth Blog
2+
3+
[中文](./README.md) | [日本語](./README.ja.md) | [繁體中文(台灣)](./README.zh-tw.md) | [繁體中文(香港)](./README.zh-hk.md)
4+
5+
A frontend engineer's learning and growth journey starting from 2018.
6+
7+
**Read online**: https://fonghehe.github.io/blog/en/
8+
9+
## 📖 Content
10+
11+
- **📅 Latest Posts**: [2026 Articles](https://fonghehe.github.io/blog/en/posts/) - Latest frontend trends and deep dives
12+
- **📚 Archive**: [2018–2025](https://fonghehe.github.io/blog/en/archive/) - Years of technical insights
13+
14+
## 🌐 Languages
15+
16+
| Language | Link |
17+
| ------------------------------- | -------------------------------------- |
18+
| 中文 (Default) | https://fonghehe.github.io/blog/ |
19+
| English | https://fonghehe.github.io/blog/en/ |
20+
| 日本語 | https://fonghehe.github.io/blog/ja/ |
21+
| Traditional Chinese (Taiwan) | https://fonghehe.github.io/blog/zh-tw/ |
22+
| Traditional Chinese (Hong Kong) | https://fonghehe.github.io/blog/zh-hk/ |
23+
24+
## Tech Stack
25+
26+
- **Framework**: VitePress 1.6.4
27+
- **Languages**: Markdown + Vue 3 + TypeScript
28+
- **Deployment**: GitHub Pages + GitHub Actions
29+
- **Package Manager**: pnpm
30+
- **Theme**: Custom dark/light theme
31+
32+
## 🚀 Local Development
33+
34+
```bash
35+
pnpm install
36+
pnpm docs:dev
37+
```
38+
39+
## 🏗️ Build
40+
41+
```bash
42+
pnpm docs:build
43+
```
44+
45+
## 👁️ Preview Build
46+
47+
```bash
48+
pnpm docs:preview
49+
```
50+
51+
## 📝 Article Stats
52+
53+
- 2018–2025: 1,192 articles (archived)
54+
- 2026: 65 latest articles
55+
- Total: 1,257+ in-depth technical articles
56+
57+
## 🎯 Main Topics
58+
59+
- Vue Ecosystem
60+
- React Latest Updates
61+
- Angular Framework
62+
- Engineering & Build Tools
63+
- Performance Optimization
64+
- Security Best Practices
65+
- TypeScript in Practice
66+
- Node.js Development
67+
- Testing & Quality
68+
- CSS New Features
69+
70+
## 📄 License
71+
72+
MIT

README.ja.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# フロントエンド成長記録
2+
3+
[中文](./README.md) | [English](./README.en.md) | [繁體中文(台灣)](./README.zh-tw.md) | [繁體中文(香港)](./README.zh-hk.md)
4+
5+
2018年から始まったフロントエンドエンジニアの学習と成長の記録です。
6+
7+
**オンラインで読む**: https://fonghehe.github.io/blog/ja/
8+
9+
## 📖 コンテンツ
10+
11+
- **📅 最新記事**: [2026年の記事](https://fonghehe.github.io/blog/ja/posts/) - 最新フロントエンド動向と深掘り解説
12+
- **📚 アーカイブ**: [2018–2025](https://fonghehe.github.io/blog/ja/archive/) - 過去の技術的な知見
13+
14+
## 🌐 言語
15+
16+
| 言語 | リンク |
17+
| ----------------- | -------------------------------------- |
18+
| 中文 (デフォルト) | https://fonghehe.github.io/blog/ |
19+
| English | https://fonghehe.github.io/blog/en/ |
20+
| 日本語 | https://fonghehe.github.io/blog/ja/ |
21+
| 繁體中文(台灣) | https://fonghehe.github.io/blog/zh-tw/ |
22+
| 繁體中文(香港) | https://fonghehe.github.io/blog/zh-hk/ |
23+
24+
## 技術スタック
25+
26+
- **フレームワーク**: VitePress 1.6.4
27+
- **言語**: Markdown + Vue 3 + TypeScript
28+
- **デプロイ**: GitHub Pages + GitHub Actions
29+
- **パッケージマネージャー**: pnpm
30+
- **テーマ**: カスタムダーク/ライトテーマ
31+
32+
## 🚀 ローカル開発
33+
34+
```bash
35+
pnpm install
36+
pnpm docs:dev
37+
```
38+
39+
## 🏗️ ビルド
40+
41+
```bash
42+
pnpm docs:build
43+
```
44+
45+
## 👁️ ビルドのプレビュー
46+
47+
```bash
48+
pnpm docs:preview
49+
```
50+
51+
## 📝 記事統計
52+
53+
- 2018–2025年: 1,192本 (アーカイブ)
54+
- 2026年: 65本の最新記事
55+
- 合計: 1,257本以上の深度技術記事
56+
57+
## 🎯 主なトピック
58+
59+
- Vueエコシステム
60+
- Reactの最新動向
61+
- Angularフレームワーク
62+
- エンジニアリング & ビルドツール
63+
- パフォーマンス最適化
64+
- セキュリティベストプラクティス
65+
- TypeScriptの実践
66+
- Node.js開発
67+
- テストと品質
68+
- CSSの新機能
69+
70+
## 📄 ライセンス
71+
72+
MIT

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,58 @@
11
# 前端成长记录
22

3+
[English](./README.en.md) | [日本語](./README.ja.md) | [繁體中文(台灣)](./README.zh-tw.md) | [繁體中文(香港)](./README.zh-hk.md)
4+
35
一个前端工程师从 2018 年开始的学习与成长记录。
46

57
**在线阅读**: https://fonghehe.github.io/blog/
68

79
## 📖 博客内容
810

9-
- **📅 最新文章**: [2026 年技术文章](/posts/) - 前端最新动态与深度解析
10-
- **📚 文章归档**: [2018-2025](/archive/) - 往年技术沉淀与总结
11+
- **📅 最新文章**: [2026 年技术文章](https://fonghehe.github.io/blog/posts/) - 前端最新动态与深度解析
12+
- **📚 文章归档**: [2018-2025](https://fonghehe.github.io/blog/archive/) - 往年技术沉淀与总结
13+
14+
## 🌐 多语言支持
15+
16+
| 语言 | 链接 |
17+
| ---------------- | -------------------------------------- |
18+
| 中文 (默认) | https://fonghehe.github.io/blog/ |
19+
| English | https://fonghehe.github.io/blog/en/ |
20+
| 日本語 | https://fonghehe.github.io/blog/ja/ |
21+
| 繁體中文(台灣) | https://fonghehe.github.io/blog/zh-tw/ |
22+
| 繁體中文(香港) | https://fonghehe.github.io/blog/zh-hk/ |
1123

1224
## 技术栈
1325

14-
- **框架**: VitePress 1.1.0
15-
- **语言**: Markdown + Vue 3
26+
- **框架**: VitePress 1.6.4
27+
- **语言**: Markdown + Vue 3 + TypeScript
1628
- **部署**: GitHub Pages + GitHub Actions
29+
- **包管理**: pnpm
1730
- **主题**: 自定义深色/浅色主题
1831

1932
## 🚀 本地运行
2033

2134
```bash
22-
npm install
23-
npm run docs:dev
35+
pnpm install
36+
pnpm docs:dev
2437
```
2538

2639
## 🏗️ 构建
2740

2841
```bash
29-
npm run docs:build
42+
pnpm docs:build
43+
```
44+
45+
## 👁️ 预览构建结果
46+
47+
```bash
48+
pnpm docs:preview
3049
```
3150

3251
## 📝 文章统计
3352

3453
- 2018-2025 年: 1,192 篇文章 (归档)
35-
- 2026 年: 60+ 篇最新文章
36-
- 总计: 1,250+ 篇深度技术文章
54+
- 2026 年: 65 篇最新文章
55+
- 总计: 1,257 篇深度技术文章
3756

3857
## 🎯 主要分类
3958

README.zh-hk.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# 前端成長記錄
2+
3+
[中文](./README.md) | [English](./README.en.md) | [日本語](./README.ja.md) | [繁體中文(台灣)](./README.zh-tw.md)
4+
5+
一名前端工程師由 2018 年開始嘅學習同成長記錄。
6+
7+
**線上閱讀**: https://fonghehe.github.io/blog/zh-hk/
8+
9+
## 📖 部落格內容
10+
11+
- **📅 最新文章**: [2026 年技術文章](https://fonghehe.github.io/blog/zh-hk/posts/) - 前端最新動態同深度解析
12+
- **📚 文章歸檔**: [2018-2025](https://fonghehe.github.io/blog/zh-hk/archive/) - 歷年技術沉澱同總結
13+
14+
## 🌐 多語言支援
15+
16+
| 語言 | 連結 |
17+
| ---------------- | -------------------------------------- |
18+
| 中文 (預設) | https://fonghehe.github.io/blog/ |
19+
| English | https://fonghehe.github.io/blog/en/ |
20+
| 日本語 | https://fonghehe.github.io/blog/ja/ |
21+
| 繁體中文(台灣) | https://fonghehe.github.io/blog/zh-tw/ |
22+
| 繁體中文(香港) | https://fonghehe.github.io/blog/zh-hk/ |
23+
24+
## 技術棧
25+
26+
- **框架**: VitePress 1.6.4
27+
- **語言**: Markdown + Vue 3 + TypeScript
28+
- **部署**: GitHub Pages + GitHub Actions
29+
- **套件管理**: pnpm
30+
- **主題**: 自訂深色/淺色主題
31+
32+
## 🚀 本地執行
33+
34+
```bash
35+
pnpm install
36+
pnpm docs:dev
37+
```
38+
39+
## 🏗️ 建置
40+
41+
```bash
42+
pnpm docs:build
43+
```
44+
45+
## 👁️ 預覽建置結果
46+
47+
```bash
48+
pnpm docs:preview
49+
```
50+
51+
## 📝 文章統計
52+
53+
- 2018-2025 年: 1,192 篇文章 (歸檔)
54+
- 2026 年: 65 篇最新文章
55+
- 總計: 1,257 篇深度技術文章
56+
57+
## 🎯 主要分類
58+
59+
- Vue 生態發展
60+
- React 最新動向
61+
- Angular 框架進展
62+
- 工程化與建置工具
63+
- 效能優化
64+
- 安全最佳實踐
65+
- TypeScript 實戰
66+
- Node.js 開發
67+
- 測試與品質
68+
- CSS 新特性
69+
70+
## 📄 License
71+
72+
MIT

0 commit comments

Comments
 (0)