Total Pageviews

Thursday, 9 July 2026

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


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

https://github.com/brightmann/sb

访问https://github.com/brightmann/sb/tree/main/content/posts,在此处新建源帖(即add file),我新建了源帖fh.md,内容为:

---
title: "战马"
date: "2026-06-23 06:49:00"
tags: ["misc1", "misc2", "misc3"]
---

此处写正文或html codes.

( 详见https://github.com/brightmann/sb/blob/main/content/posts/fh.md?plain=1) 

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

  Build Command栏填入bun run build

 Install Command栏填入bun install

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

https://sb-pink-eta.vercel.app/

项目地址:

https://github.com/samirettali/blog

https://github.com/brightmann/sb

演示博客: 

 https://sb-pink-eta.vercel.app/

https://sb-pink-eta.vercel.app/posts
 https://sb-pink-eta.vercel.app/posts/fh 能显示视频
https://sb-pink-eta.vercel.app/posts/hosting
https://github.com/brightmann/sb/blob/main/lib/content.ts ,注意第44行和第49行,有了
 allowDangerousHtml: true ,才能显示视频。
 

No comments:

Post a Comment