干货 资源 Rules & Tips
1. 遵守中国大陆相关法律法规
2. 你的体验心得比资源本身更稀有
3. 提倡分享和讨论 OA 资源
4. 反对标题党

一分钱都不用花,搭建博客最好方法:notion+vercel

查看: 1490|回复: 26
3 2
迷人的小约翰 发表于 2022-12-1 21:55:23
来源:
教程:https://tangly1024.com/article/n ... a4a9217dac326b3cb69
GitHub地址:https://github.com/tangly1024/NotionNext
vercel地址:https://vercel.com/
-------------
说明:
试过很多搭建博客的方法,今天逛github发现notion+vercel居然直接生成静态博客,这就意味着不需要像wordpress买个服务器,不需要像hexo还去本地push代码。直接在notion写好文章,网页就会自动更新,页面还特别美观,多爽啊!想像就兴奋,这么简单方便的东西,为啥之前没发现?我认为这已经是目前最爽的写博客的方式了。
最终效果:
https://notion.hi-nikola.cn/
rojye 发表于 2022-12-3 10:53:13
非常不错,可以试试。一直么有长期的博客,有时候是忘了给vps续费,有时候是域名没续费,总之各种各样的原因

钉子户

客尘 发表于 2022-12-1 22:06:59
博客园
 OP| 迷人的小约翰 发表于 2022-12-1 22:07:29
现在好像GitHub被墙了,需要点手段。另外如果想自定义域名,需要花钱买,当然,vercel有免费域名
眉如远山 发表于 2022-12-1 22:23:56
grida也挺方便的


补充内容 (2022-12-1 22:24):
gridea
 OP| 迷人的小约翰 发表于 2022-12-2 10:07:23

对的。这个我也用过。
kfj000 发表于 2022-12-2 14:44:43
感谢分享,以前是hexo建的。
 OP| 迷人的小约翰 发表于 2022-12-2 20:23:05
kfj000 发表于 2022-12-2 14:44
感谢分享,以前是hexo建的。

hexo 在其他设备上不方便更新
执笔剧中人 发表于 2022-12-2 20:31:00
我现在还是hexo+gitee
执笔剧中人 发表于 2022-12-2 20:35:51

感觉楼主这个不错奥,试一试
ejsoon 发表于 2022-12-2 22:28:12
樓主可知道tiddlywiki?這個才是真正的純靜態,一分錢不用花。它比notion好,原因是notion資料保存在外國服務器,慢且有牆的風險。

示例:
https://loli.ejsoon.win/
rojye 发表于 2022-12-3 11:14:18
ejsoon 发表于 2022-12-2 22:28
樓主可知道tiddlywiki?這個才是真正的純靜態,一分錢不用花。它比notion好,原因是notion資料保存在外國服 ...

外国服务有外国服务器的好,国内服务器监管太严重
Davis chenyu 发表于 2022-12-3 12:08:25
不会敲代码怎么搭建呐
 OP| 迷人的小约翰 发表于 2022-12-3 12:34:20
rojye 发表于 2022-12-3 11:14
外国服务有外国服务器的好,国内服务器监管太严重

是的。国内是有监管审核的。
 OP| 迷人的小约翰 发表于 2022-12-3 12:41:06
ejsoon 发表于 2022-12-2 22:28
樓主可知道tiddlywiki?這個才是真正的純靜態,一分錢不用花。它比notion好,原因是notion資料保存在外國服 ...

谢谢分享。我研究一下。https://tiddlywiki.com/


补充内容 (2022-12-3 12:55):
有点不太习惯
 OP| 迷人的小约翰 发表于 2022-12-3 12:57:00
高晨煜 发表于 2022-12-3 12:08
不会敲代码怎么搭建呐

step 1 :FORK仓库
step 2 :vercel  deploy项目
十几分钟就ok了
Davis chenyu 发表于 2022-12-4 09:10:01
迷人的小约翰 发表于 2022-12-3 12:57
step 1 :FORK仓库
step 2 :vercel  deploy项目
十几分钟就ok了

谢谢,都是汉语输入打字嘛
ejsoon 发表于 2022-12-4 11:19:10
迷人的小约翰 发表于 2022-12-3 12:41
谢谢分享。我研究一下。https://tiddlywiki.com/

只需要少量的學習,你就可以只專注於文字內容啦。它裏面的每一篇文章都可以導出成json。不管是寫教程,寫總結,寫日記,寫博客,都不成問題。如果某個tiddlywiki文件太大,可以分成幾個,還可以任意切分。像堆磚塊一樣,磚全部給你了,房子想怎麼搭就怎麼搭。
 OP| 迷人的小约翰 发表于 2022-12-5 12:44:06
ejsoon 发表于 2022-12-4 11:19
只需要少量的學習,你就可以只專注於文字內容啦。它裏面的每一篇文章都可以導出成json。不管是寫教程,寫 ...

好的  谢谢
花漫城 发表于 2022-12-13 17:59:30
不错,学习到了,准备搭建一个
HardLucker 发表于 2022-12-16 11:15:59
1.打开这篇Notion页面,并复制到你的notion空间: (点击右上角Duplicate )
这一步不明白怎么弄啊,什么意思  啊
HardLucker 发表于 2022-12-16 11:27:28
[11:23:14.351] Cloning github.com/itwwangfeng/NotionNext (Branch: main, Commit: a07bf51)
[11:23:14.540] Previous build cache not available
[11:23:15.124] Cloning completed: 772.227ms
[11:23:15.413] Running "vercel build"
[11:23:16.075] Vercel CLI 28.9.0
[11:23:16.527] Installing dependencies...
[11:23:16.977] yarn install v1.22.17
[11:23:17.041] info No lockfile found.
[11:23:17.054] [1/4] Resolving packages...
[11:23:24.619] warning react-notion-x > react-use > nano-css > sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
[11:23:26.039] warning valine > leancloud-storage > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[11:23:26.112] warning valine > leancloud-storage > superagent@3.8.3: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
[11:23:26.150] warning valine > leancloud-storage > superagent > formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
[11:23:26.201] warning valine > leancloud-storage > leancloud-realtime > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[11:23:26.760] warning valine > leancloud-storage > leancloud-realtime > @leancloud/platform-adapters-node > @leancloud/adapters-superagent > superagent@5.3.1: Please upgrade to v7.0.2+ of superagent.  We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing.  See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
[11:23:26.763] warning valine > leancloud-storage > leancloud-realtime > @leancloud/platform-adapters-node > @leancloud/adapters-superagent > superagent > formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
[11:23:27.307] warning @waline/client > vue > @vue/compiler-sfc > magic-string > sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
[11:23:30.166] [2/4] Fetching packages...
[11:23:57.206] [3/4] Linking dependencies...
[11:23:57.209] warning "gitalk > react-flip-move@2.9.14" has incorrect peer dependency "react@0.13.x || 0.14.x || 15.x.x".
[11:23:57.209] warning "gitalk > react-flip-move@2.9.14" has incorrect peer dependency "react-dom@0.13.x || 0.14.x || 15.x.x".
[11:23:57.211] warning "react-facebook > react-spinner-children@1.0.8" has incorrect peer dependency "react@15.x || 16.x".
[11:23:57.211] warning " > react-messenger-customer-chat@0.8.0" has incorrect peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0".
[11:23:57.211] warning "react-notion-x > react-image@4.0.3" has unmet peer dependency "@babel/runtime@>=7".
[11:23:57.212] warning "react-notion-x > react-lazy-images@1.1.0" has incorrect peer dependency "react@^15 || ^16".
[11:23:57.213] warning "react-notion-x > react-lazy-images@1.1.0" has incorrect peer dependency "react-dom@^15 || ^16".
[11:23:57.214] warning "react-notion-x > react-pdf > file-loader@6.2.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
[11:23:57.216] warning "eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[11:24:09.262] [4/4] Building fresh packages...
[11:24:10.684] success Saved lockfile.
[11:24:10.692] Done in 53.72s.
[11:24:10.762] Detected Next.js version: 12.1.6
[11:24:10.764] Running "yarn run build"
[11:24:11.109] yarn run v1.22.17
[11:24:11.174] $ next build && next-sitemap --config next-sitemap.config.js
[11:24:11.791] info  - Loaded env from /vercel/path0/.env.local
[11:24:12.438] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[11:24:12.440] This information is used to shape Next.js' roadmap and prioritize features.
[11:24:12.440] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[11:24:12.440] https://nextjs.org/telemetry
[11:24:12.440]
[11:24:13.287] info  - Checking validity of types...
[11:24:17.198] info  - Creating an optimized production build...
[11:25:34.104] info  - Compiled successfully
[11:25:34.105] info  - Collecting page data...
[11:25:35.653] [请求API] from:category-paths id:e098eefe06e04477a0f94ba27d4c2bac
[11:25:35.659] [请求API] from:slug-paths id:e098eefe06e04477a0f94ba27d4c2bac
[11:25:35.870] [请求API] from:category-paths id:e098eefe06e04477a0f94ba27d4c2bac
[11:25:36.076] [响应成功]: from:category-paths
[11:25:36.077] [API耗时] 425ms
[11:25:36.081]
[11:25:36.082] > Build error occurred
[11:25:36.088] TypeError: Cannot convert undefined or null to object
[11:25:36.088]     at Function.values (<anonymous>)
[11:25:36.089]     at getAllPageIds (/vercel/path0/.next/server/chunks/334.js:292:16)
[11:25:36.089]     at getPageRecordMapByNotionAPI (/vercel/path0/.next/server/chunks/334.js:591:88)
[11:25:36.089]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[11:25:36.089]     at async getGlobalNotionData (/vercel/path0/.next/server/chunks/334.js:420:88)
[11:25:36.090]     at async getStaticPaths (/vercel/path0/.next/server/pages/category/[category].js:92:29)
[11:25:36.090]     at async buildStaticPaths (/vercel/path0/node_modules/next/dist/build/utils.js:491:31)
[11:25:36.090]     at async /vercel/path0/node_modules/next/dist/build/utils.js:632:119
[11:25:36.090]     at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20) {
[11:25:36.090]   type: 'TypeError'
[11:25:36.090] }
[11:25:36.169] error Command failed with exit code 1.
[11:25:36.170] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[11:25:36.197] Error: Command "yarn run build" exited with 1
HardLucker 发表于 2022-12-16 11:36:29
真的是小白吗?怎么一步步按你的来就是不对那
HardLucker 发表于 2022-12-16 11:56:47
大神啊,这弄好了不会用啊,后台
纯英文的吗?
 OP| 迷人的小约翰 发表于 2022-12-23 11:23:46
HardLucker 发表于 2022-12-16 11:56
大神啊,这弄好了不会用啊,后台
纯英文的吗?

很容易的。https://tangly1024.com/article/n ... f50876e34d8935aad1c   按照教程
 OP| 迷人的小约翰 发表于 2022-12-23 11:24:51
HardLucker 发表于 2022-12-16 11:27
[11:23:14.351] Cloning github.com/itwwangfeng/NotionNext (Branch: main, Commit: a07bf51)
[11:23:14.5 ...

需要notion账号,你要duplicate教程中的那个notion页面
987 发表于 2022-12-30 14:21:22
都是程序员吗
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

陕ICP备14001577号-1川公网安备 51019002003015号联系我们FAQ关于虫部落免责声明虫部落生存法则蛙先知 - 简中冲浪胜地

Build with for "make search easier" Copyright © 2013-2022. Powered by Discuz! GMT+8, 2023-1-29 20:07

快速回复 返回顶部 返回列表