首先fork此项目https://github.com/PrinOrange/nextjs-lexical-blog. 我fork后,得到的项目地址是https://github.com/brightmann/nextjs-lexical-blog/.
访问 https://github.com/brightmann/nextjs-lexical-blog/tree/main/data/posts,在这里新建源帖(即add file),我新建了源帖2026-06-20-fh.md ,内容为:
---
title: "战马"
time: "2026-06-20 09:40:00"
tags: ["misc1", "misc2", "misc3"]
summary: "这是一篇文章"
---
此处写正文或html codes.
( 详见https://github.com/brightmann/nextjs-lexical-blog/blob/main/data/posts/2026-06-20-fh.md?plain=1)
然后,访问https://app.netlify.com/,导入项目https://github.com/brightmann/nextjs-lexical-blog/ . Project name的值可以自己设置(我设置为nlb-ym),这个值就是平台给你的二级域名。
我点击deploy按钮后,得到的网址是 https://nlb-ym.netlify.app/
项目地址: https://github.com/PrinOrange/nextjs-lexical-blog.
https://github.com/brightmann/nextjs-lexical-blog/
演示博客: https://nlb-ym.netlify.app/
https://nlb-ym.netlify.app/posts ,支持分页。
我在vercel.com/new部署失败,于是转到 https://app.netlify.com/部署。
https://github.com/PrinOrange/nextjs-lexical-blog/issues/11
我在本地的windows的git-bash程序里,build成功。运行pnmp dev, 然后访问http://127.0.0.1:3000/,即可看到网站效果。如图:
如果你在linux vps里部署它,则另外安装nginx, 用nginx反向代理127.0.0.1:3000

No comments:
Post a Comment