Total Pageviews

Saturday, 8 August 2026

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


首先fork此项目:https://github.com/alexpate/www,我fork后,得到的项目地址是

https://github.com/briteming/apw/,然后删除pnpm-lock.yaml。不要删除package-lock.json!编辑https://github.com/briteming/apw/blob/main/package.json ,修改第19行的next-mdx-remote的值为^6.0.0

访问https://github.com/briteming/apw/tree/main/posts,在此处新建源帖(即add file),我新建了源帖2026-06-04-fh.mdx,内容为:

---
title:  "战马"
summary: "这是一篇文章"
---

此处写正文或html codes.

( 详见https://github.com/briteming/apw/blob/main/posts/2026-06-04-fh.mdx?plain=1) 

然后,访问vercel.com/new ,导入项目
https://github.com/briteming/apw/

  Build Command栏填入npm run build
 Install Command栏填入npm install

然后点击底部的deploy按钮,等待部署完成。部署完成后,我得到网址:
https://apw-three.vercel.app/

项目地址:
https://github.com/alexpate/www
https://github.com/briteming/apw/

演示博客:

 https://apw-three.vercel.app/

 https://apw-three.vercel.app/posts
https://apw-three.vercel.app/posts/fh 能显示视频

同一天里的帖子是按字母顺序从上到下排列:

 https://apw-three.vercel.app/posts/ce

 https://apw-three.vercel.app/posts/fh

 https://apw-three.vercel.app/posts/test

 https://apw-three.vercel.app/posts/ur-advice

 

No comments:

Post a Comment