Total Pageviews

Sunday, 9 August 2026

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

首先fork此项目:https://github.com/frontendweb3/nextra-blog,我fork后,得到的项目地址是https://github.com/briteming/fnb ,
把https://github.com/briteming/fnb/blob/main/next.config.js里面的basePath的值改为空白。删除https://github.com/briteming/fnb里面的yarn.lock文件。


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

---
title: 战马
description: 点击标题看全文
date: 2026-05-25T12:44:00.826Z
tag: misc1, misc2, misc3
category: Photography
image: /images/photographer.jpg
author: ym
---

此处写正文或html codes.

( 详见https://github.com/briteming/fnb/blob/main/pages/posts/fh.mdx?plain=1) 

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

  Build Command栏填入pnpm build
 Install Command栏填入pnpm install 

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

项目地址:
https://github.com/frontendweb3/nextra-blog
https://github.com/briteming/fnb

演示博客:

 https://fnb-phi.vercel.app/

 https://fnb-phi.vercel.app/posts ,

https://fnb-phi.vercel.app/posts/fh 能够显示视频

No comments:

Post a Comment