基于 Next.js 16、React 19、MDX 与 Contentlayer 的个人网站。记录 AI Agent、开发者工具与全栈工程实践,以静态文件部署到 Vercel。
A personal website built with Next.js 16, React 19, MDX, and Contentlayer. Notes on AI agents, developer tools, and fullstack engineering, statically exported for Vercel.
线上 / Live: https://coooder-blog.vercel.app/
使用 Node.js 20+ 和仓库指定的 Yarn 版本。
yarn install --immutable
yarn dev
yarn check
yarn serveyarn check 依次执行 ESLint、类型检查、生产构建和导出内容检查,不修改源码、不发布、不触发远端任务。yarn serve 在本机预览 out/(默认端口 3101,可设置 PORT),不存在的地址返回真正的 404。
yarn check runs ESLint, type checking, a production build, and export checks without fixing source files or publishing. yarn serve previews out/ on localhost, port 3101 (PORT overrides it), including real 404 responses.
yarn lint— non-mutating source checks;yarn lint:fixexplicitly applies fixes.yarn typecheck— regenerates Contentlayer data and Next route types, then runs TypeScript.yarn check:content— checks an existing export; run afteryarn build.
ESLint uses the native Next 16 flat configuration. Formatting is handled separately by Prettier, avoiding repository-wide format-only edits. Four existing browser-hydration state initializations have narrowly scoped, explained exceptions; the hooks rule remains enabled elsewhere.
- 直接编辑
data/blog/*.mdx,文章与图片随仓库版本管理。Contentlayer 生成类型数据,Next.js 输出到out/。 - Author posts directly in
data/blog/*.mdx. Content and images are versioned in Git; Contentlayer feeds the static export inout/. draft: true不进入公开页面、元信息、列表、标签、系列导航和 sitemap,开发预览也遵守同样规则。data/blog/__draft-publication-check.mdx是无敏感数据的回归测试样例;检查会扫描导出文件,防止样例正文、标题、标签或草稿 URL 泄漏。- Draft protection applies to the website, not GitHub visibility. Never commit private drafts or secrets to a public repository. The synthetic draft fixture is intentionally public source used to test the export boundary.
- UI、标题和摘要支持中英文;正文由
bodyLanguage: zh | en指定原文语言,不自动翻译。 - Navigation, titles, and summaries support Chinese and English.
bodyLanguagedescribes the actual article body; switching the UI does not translate it. - 站点默认中文。通用页面的分享信息为中文,文章分享信息采用原文标题、摘要和语言。客户端语言偏好不会改变静态分享卡片;未提供正文译文的页面不声明英文替代 URL。
- The default static document is Chinese. Article metadata follows the original language. Client language preferences do not change crawler-visible share cards; no translated alternate URLs are claimed without translated content.
title: 原文标题
titleEn: English title
summary: 中文摘要
summaryEn: English summary
bodyLanguage: zh
date: '2026-10-06'
tags: ['agents']可用 xPostUrl 和 socialSummary 为文章添加 X 讨论链接,无需 API token。
Use optional xPostUrl and socialSummary fields to link an X discussion without an API token.
data/projectsData.ts 维护案例简介,data/projectEvidence.ts 维护双语实现说明、阶段限制、截图来源与固定提交版本的源码链接。
Keep case summaries in data/projectsData.ts and evidence in data/projectEvidence.ts. Evidence links are pinned to reviewed public commits. Distinguish implementation, test cases, actual test runs, and roadmap items. Do not publish company-internal work, credentials, or health data.
Notion 与 GitHub/X 同步工作流、脚本、同步清单和 API 依赖已移除,不再定时拉取、创建 PR 或自动合并。现有 MDX、图片与静态社交数据保留。恢复旧实现请查阅 Git 历史。
The old Notion and GitHub/X synchronization workflows, scripts, manifest, and API dependencies have been removed. There are no scheduled content pulls, sync PRs, or auto-merges. Existing posts, images, and static social data remain; historical tooling is recoverable from Git.
构建不需要 Notion、GitHub 或 X 凭据。迁移不会读取或删除你的本地 .env、账户 token 或 GitHub Secrets;不再使用的凭据可由所有者另行撤销。
No Notion, GitHub, or X credentials are needed to build. This cleanup does not read or delete local .env files, account tokens, or GitHub Secrets; owners may revoke unused credentials separately.
Vercel build command: yarn build; output directory: out.
提交、PR、合并和发布由维护者显式操作,仓库不包含自动内容同步或自动合并管线。 Commits, PRs, merges, and releases are explicit maintainer actions; this repository contains no content-sync or auto-merge pipeline.
Issues and PRs are welcome. Please discuss substantial theme changes in an issue first.
No license file yet. Add one if you plan to reuse the codebase (e.g. MIT).