|
| 1 | +# NotionNext |
| 2 | + |
| 3 | +一个使用 NextJS + Notion API 实现的,部署在 Vercel 上的静态博客系统。为Notion和所有创作者设计。 |
| 4 | + |
| 5 | +<p> |
| 6 | + <a aria-label="GitHub commit activity" href="https://github.com/tangly1024/NotionNext/commits/main" title="GitHub commit activity"> |
| 7 | + <img src="https://img.shields.io/github/commit-activity/m/tangly1024/NotionNext?style=for-the-badge"> |
| 8 | + </a> |
| 9 | + <a aria-label="GitHub contributors" href="https://github.com/tangly1024/NotionNext/graphs/contributors" title="GitHub contributors"> |
| 10 | + <img src="https://img.shields.io/github/contributors/tangly1024/NotionNext?color=orange&style=for-the-badge"> |
| 11 | + </a> |
| 12 | + <a aria-label="Build status" href="#" title="Build status"> |
| 13 | + <img src="https://img.shields.io/github/deployments/tangly1024/NotionNext/Preview?logo=Vercel&style=for-the-badge"> |
| 14 | + </a> |
| 15 | +</p> |
| 16 | + |
| 17 | +[中文说明 / [English](README.md)] |
| 18 | + |
| 19 | +演示地址:[https://www.tangly1024.com/](https://www.tangly1024.com/) |
| 20 | + |
| 21 | +<details><summary>截图</summary> |
| 22 | +</details> |
| 23 | + |
| 24 | +## 亮点 ✨ |
| 25 | + |
| 26 | +**🚀 秒开,设备全适配** |
| 27 | + |
| 28 | +- 快速的页面渲染和响应式设计 |
| 29 | +- 高效编译器的快速静态页面生成 |
| 30 | + |
| 31 | +**🤖 自动,无需重新部署** |
| 32 | + |
| 33 | +- 部署在免费、高速的 Vercel 平台 |
| 34 | +- 支持增量式更新,更新文章后无需重复部署 |
| 35 | + |
| 36 | +**🚙 全功能,完全不操心** |
| 37 | + |
| 38 | +- 评论、宽页面、搜索和标签 |
| 39 | +- 订阅、网站统计、Web Vital 分析…… 还有更多功能待你发现 |
| 40 | + |
| 41 | +**🎨 美观,轻松自定义** |
| 42 | + |
| 43 | +- 丰富的配置项,更支持多语言 |
| 44 | +- 使用 Tailwind CSS,轻松实现二次开发 |
| 45 | + |
| 46 | +**🕸 网址美观、搜索引擎优化** |
| 47 | + |
| 48 | +## 快速起步 |
| 49 | + |
| 50 | +- 给这个项目点个小星星 😉 |
| 51 | +- 将 [这个 Notion 模板](https://www.notion.so/68be9021bca34b8e89f0246f27e608df) 制作副本,并分享这个页面给所有人 |
| 52 | +- [Fork](https://github.com/tlyong1992/NotionNext/fork) 这个项目 |
| 53 | +- 在 `blog.config.js` 配置相关选项 |
| 54 | +- _(可选)_ 用自己的图片替换 `/public` 文件夹里的 `avatar.svg`、`favicon.svg` 和 `favicon.ico` |
| 55 | +- 在 [Vercel](https://vercel.com) 上部署这个项目, 设定一下环境变量: |
| 56 | + - `NOTION_PAGE_ID`: 你刚刚分享出去的 Notion 页面网址中的页面 ID,通常是网址中工作区地址后的 32 位字符串 |
| 57 | + - `NOTION_ACCESS_TOKEN`(可选): 如果你决定不分享你的数据库,你可以使用 token 来让网页从 Notion 数据库中抓取数据。你可以在你的浏览器 cookies 中找到它,名称是 `token_v2'。 |
| 58 | + - Notion token 的有效期只有 180 天,请确保在 Vercel Dashboard 上手动更新,我们可能会在未来切换到官方 API 来解决这个问题。此外,如果数据库是非公开到,Notion 中的图片可能无法正常显示到网页上。 |
| 59 | +- **稍微等等就可以访问了!** 简单吗? |
| 60 | + |
| 61 | +## 技术细节 |
| 62 | + |
| 63 | +- **生成**: Next.js SSG 和 Incremental Static Regeneration |
| 64 | +- **页面渲染**: [React-notion-x](https://github.com/NotionX/react-notion-x) |
| 65 | +- **样式**: Tailwind CSS 和 `@tailwindcss/jit` compiler |
| 66 | +- **评论**: Gitalk,Cusdis,Utterances |
| 67 | +- **图标**:[fontawesome](https://fontawesome.com/v5.15/icons?d=gallery) |
| 68 | + |
| 69 | +## License |
| 70 | + |
| 71 | +The MIT License. |
0 commit comments