feat(architecture): implement consultant review r4 (stream separation, nav upgrade, internal cta, schema & anchor fixes)
Deploy / build (push) Successful in 25s

This commit is contained in:
hoelee committed 2026-10-27 01:19:38 +08:00
1 parent cc28722c79
commit 419c962e2f
31 files changed
+286 -42

No files matched your search

+14 -7
View File
@@ -41,7 +41,7 @@ export const CATEGORY_META: Record<CategorySlug, CategoryMeta> = {
},
'case-studies': {
slug: 'case-studies',
name: { en: 'Case Studies', zh: '案例研究' },
name: { en: 'Case Studies', zh: '工程案例' },
blurb: {
en: 'How I built X, end to end: the problem, the debugging story, the fix and the measured result. This is my working portfolio.',
zh: '「我是如何构建 X」的完整实录:问题、踩坑、修复与可衡量的结果。这是我的实战作品集。',
@@ -50,16 +50,16 @@ export const CATEGORY_META: Record<CategorySlug, CategoryMeta> = {
},
devops: {
slug: 'devops',
name: { en: 'DevOps', zh: 'DevOps' },
name: { en: 'DevOps', zh: '运维架构' },
blurb: {
en: 'Docker & Portainer, Traefik, Cloudflare tunnels, a ~140-container NAS homelab, backups and monitoring — my most hands-on, differentiated material.',
zh: 'Docker/Portainer、Traefik、Cloudflare 隧道、约 140 个容器的 NAS 家庭机房、备份与监控——我最硬核、实操最深的领域。',
en: 'Docker & Portainer, Traefik, Cloudflare tunnels, 162 production containers across 3 hosts, backups and monitoring — my most hands-on, differentiated material.',
zh: 'Docker/Portainer、Traefik、Cloudflare 隧道、三宿主 162 个生产容器、备份与监控——我最硬核、实操最深的领域。',
},
accent: '#295cff',
},
engineering: {
slug: 'engineering',
name: { en: 'Engineering', zh: '工程开发' },
name: { en: 'Engineering', zh: '系统工程' },
blurb: {
en: 'Java & Spring, PHP and WordPress deep dives — how production web applications are really put together, from the code up.',
zh: 'Java/Spring、PHP 与 WordPress 深度解析——生产级 Web 应用从代码层面开始的真实构建方式。',
@@ -68,7 +68,7 @@ export const CATEGORY_META: Record<CategorySlug, CategoryMeta> = {
},
notes: {
slug: 'notes',
name: { en: 'Notes', zh: '随记' },
name: { en: 'Notes', zh: '排障手记' },
blurb: {
en: 'Short, low-friction entries: fixes, gotchas and link roundups from day-to-day work. Quick reads that save someone an afternoon.',
zh: '简短速记:问题修复、避坑记录与链接精选,来自日常开发的第一手经验。三分钟读完,省一个下午。',
@@ -77,7 +77,7 @@ export const CATEGORY_META: Record<CategorySlug, CategoryMeta> = {
},
tutorials: {
slug: 'tutorials',
name: { en: 'Tutorials', zh: '教程' },
name: { en: 'Tutorials', zh: '实战教程' },
blurb: {
en: 'Beginner-friendly, follow-along how-tos. Copy the commands, run them, get a working result — then understand why it worked.',
zh: '面向初学者的跟练教程:复制命令、动手运行、得到可用结果——再弄懂它为什么能work。',
@@ -101,4 +101,11 @@ export const ALL_CATEGORIES: CategoryMeta[] = CATEGORY_SLUGS.map((s) => CATEGORY
/** Safer lookup that tolerates unknown strings (e.g. old post data). */
export function categoryMeta(slug: string): CategoryMeta | undefined {
return (CATEGORY_META as Record<string, CategoryMeta | undefined>)[slug];
}
/** Get localized display label for a category slug. */
export function categoryLabel(slug: string, lang: 'en' | 'zh' = 'en'): string {
const meta = categoryMeta(slug);
if (!meta) return slug;
return meta.name[lang] ?? meta.name.en ?? slug;
}