Skip to content

NotionNext 开发先导

迁移自:NotionNext开发先导

⚠️ 更完整的开发者文档请以本仓库为准:

环境

  • Node 20(见 .nvmrcREADME
  • Yarnyarnyarn dev
  • 编辑器:VS Code 推荐

配置入口

  • blog.config.js + conf/*.config.js
  • 各主题 themes/<name>/config.js
  • 自定义脚本:public/js/custom.jspublic/css/custom.cssCUSTOM_EXTERNAL_*

云开发(Codespaces)

GitHub 仓库 → CodeCodespaces → Create → 终端 yarnyarn dev

本地开发

  1. Clone 仓库(GitHub Desktop 或 git clone
  2. yarn 安装依赖
  3. .env.local 配置 NOTION_PAGE_ID
  4. 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