NotionNext 个人网站管理与排错
姚军的个人网站(idky.tech / idkyjun.me)基于 NotionNext + Vercel 构建,本 Skill 覆盖日常管理与排错。
技术栈
| 组件 | 用途 |
|---|---|
| Notion | 内容管理(数据库作为 CMS) |
| NotionNext | Notion → 博客网站的渲染框架 |
| Vercel | 托管与自动部署 |
| Cloudflare | DNS 管理 |
| GitHub (683280yj) | 代码托管 |
关键配置:Notion Integration 权限
最常见的排错问题 — Integration 未分享数据库页面!
Notion Integration 需要被显式分享给目标数据库页面才能访问:
- 在 Notion Integrations 创建 Internal Integration
- 复制
Internal Integration Secret(token) - 打开你的 Notion 数据库页面
- 点击右上角
...→Connections→Add connections - 选择你创建的 Integration 名称
- 确认 Integration 出现在 Connections 列表中
常见错误:
- HTTP 401/403 → Integration 权限未配置或 token 错误
- 数据库返回空 → Integration 未被分享该页面
Vercel 部署检查
环境变量(必配)
NOTION_PAGE_ID=<你的Notion页面ID>
NOTION_TOKEN_SECRET=<Integration Secret Token>
部署触发
- Push 到 GitHub 主分支 → Vercel 自动部署
- 在 Vercel Dashboard 可手动 Redeploy
常见排错
- 部署成功但页面空白 → 检查 Notion 数据库结构是否匹配 NotionNext 预期格式
- 图片不显示 → 检查 Notion 图片权限(需要是公开可访问的链接)
- 样式丢失 → 清除 Vercel 缓存后重新部署
域名配置
| 域名 | 用途 |
|---|---|
| idky.tech | 主域名 |
| idkyjun.me | 备用/个人域名 |
DNS 记录(Cloudflare)
- CNAME → Vercel 提供的域名(
cname.vercel-dns.com) - 确保 Cloudflare SSL/TLS 设置为 "Full" 或 "Full (strict)"
Vercel 侧
- Domains → 添加自定义域名
- 等待 DNS 生效(通常 1-5 分钟)
日常维护清单
- [ ] Vercel 部署状态(Dashboard 查看最新部署)
- [ ] Notion Integration 是否正常(token 未过期)
- [ ] 网站可访问性(HTTPS 正常)
- [ ] DNS 解析正常
- [ ] 内容同步(Notion 编辑后网站是否更新)
排错决策树
网站打不开?
├── Vercel 部署失败?
│ ├── 检查 Vercel 构建日志
│ ├── 检查 GitHub Actions(如有)
│ └── 检查环境变量是否过期
├── Vercel 部署成功但无法访问?
│ ├── 检查 DNS 解析(dig/nslookup)
│ ├── 检查 Cloudflare SSL 设置
│ └── 检查 Vercel Domains 配置
└── 网站打开但内容为空?
├── 检查 Notion Integration 权限
├── 检查 Notion 数据库页面是否被分享给 Integration
├── 检查 NOTION_PAGE_ID 是否正确
└── 检查 Notion 数据库结构是否变更