NotionNext 开发先导
迁移自:NotionNext开发先导
⚠️ 更完整的开发者文档请以本仓库为准:
- docs/developer/GETTING_STARTED.md(GitHub)
- docs/ARCHITECTURE.md(GitHub)
- docs/PROJECT_STRUCTURE.md(GitHub)
- CONTRIBUTING.md
环境
- Node 20(见
.nvmrc、README) - Yarn:
yarn→yarn dev - 编辑器:VS Code 推荐
配置入口
blog.config.js+conf/*.config.js- 各主题
themes/<name>/config.js - 自定义脚本:
public/js/custom.js、public/css/custom.css或CUSTOM_EXTERNAL_*
云开发(Codespaces)
GitHub 仓库 → Code → Codespaces → Create → 终端 yarn → yarn dev。
本地开发
- Clone 仓库(GitHub Desktop 或
git clone) yarn安装依赖.env.local配置NOTION_PAGE_ID等yarn dev→ 浏览器打开http://localhost:3000
VS Code 可用 .vscode/launch.json 调试 Server / Client / Full Stack。
技术栈
- Next.js(Pages Router)— Next.js 中文文档
- Tailwind CSS — 实用类样式
- 主题代码主要在
themes/
代码规范
项目使用 ESLint + Prettier,保存时格式化(见源站 VS Code 插件说明)。
原文链接
https://docs.tangly1024.com/article/how-to-develop-with-notion-next