Total Pageviews

Saturday, 19 September 2026

搭建基于nextjs的静态博客程序nnmb


首先fork此项目https://github.com/nelsonlaidev/nextjs-mdx-blog,我fork后,得到的项目地址是https://github.com/brightmann/nnmb-source
 删除pnpm-lock.yaml 
 编辑https://github.com/brightmann/nnmb-source/blob/main/package.json文件,修改next-mdx-remote的值为6.0.0
 在这里https://github.com/brightmann/nnmb-source/tree/main/data/blog 新建源帖fh.mdx ,内容为:

---
title: 战马
date: "2026-06-14T08:49:00"
summary: 这是一篇文章
---

此处写正文或html codes.

(详见https://github.com/brightmann/nnmb-source/blob/main/data/blog/fh.mdx?plain=1)

 然后,访问vercel.com/new ,导入项目https://github.com/brightmann/nnmb-source,

 在Build Command栏填入npm run build
 在Install Command栏填入npm install --force

 点击底部的deploy按钮,等待部署完成。部署完成后,我得到网址:

https://nnmb-source.vercel.app/

项目地址:

https://github.com/nelsonlaidev/nextjs-mdx-blog

https://github.com/brightmann/nnmb-source

演示博客地址:

 https://nnmb-source.vercel.app/

 https://nnmb-source.vercel.app/blog/fh 能显示视频

 

No comments:

Post a Comment