Pages

Friday, 30 January 2026

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


首先fork此项目https://github.com/zplata/plant-blog-rive,我fork后的项目地址是
 https://github.com/ymbrite/pbr/
然后访问https://github.com/ymbrite/pbr/tree/main/_posts,新建源帖fh.md,内容为:

---
title: '战马'
excerpt: '这是一篇文章'
coverImage: '/assets/rives/sunflower_button.riv'
date: '2026-01-29T23:59:00.322Z'
author:
  name: ym
  picture: '/assets/blog/authors/jj.jpeg'
ogImage:
  url: '/assets/blog/preview/cover.jpg'
---

此处写视频的嵌入代码

( 详见https://github.com/ymbrite/pbr/blob/main/_posts/fh.md?plain=1)

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

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

 https://pbr-kappa.vercel.app/

 新建源帖后,博客网站2-3分钟内就会自动更新。

 项目地址:

https://github.com/zplata/plant-blog-rive

 https://github.com/ymbrite/pbr/

演示博客:https://pbr-kappa.vercel.app/,

https://pbr-kappa.vercel.app/posts/fh  原本不能显示视频。解决办法:

 访问https://github.com/ymbrite/pbr/blob/main/lib/markdownToHtml.ts ,把第5行的.use(html)改为.use(html, { sanitize: false })

 2分钟后,再访问https://pbr-kappa.vercel.app/posts/fh ,发现能显示视频了。

 

No comments:

Post a Comment