Total Pageviews

Sunday, 14 December 2025

搭建基于nextjs的静态博客程序shn(支持分页)



首先fork此项目https://github.com/statichunt/hydrogen-nextjs,我fork后的项目地址是https://github.com/briteming/shn  , 访问https://github.com/briteming/shn/blob/main/package.json ,修改第19行的值为latest ,
因为nextjs的旧版 15.0.0-16.0.6被发现有安全漏洞,vercel.com会拒绝为nextjs的旧版 15.0.0-16.0.6进行build.(15.0.0之前的旧版,不修改其版本号也可。)
然后访问https://github.com/briteming/shn/tree/main/content/posts ,新建源帖fh.md,内容为

---
title: "战马"
date: 2025-12-14T08:29:00Z
image: /images/posts/post-1.jpg
categories: 
  - misc1
  - misc2
draft: false
---

此处写视频的嵌入代码

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

 然后访问vercel.com/new ,导入项目https://github.com/briteming/shn 。在此步,install command的值要改为:

npm install --force ,然后才点击deploy按钮。

见下图:


 

点击deploy按钮,等待部署完成,部署完成后,我得到网址https://shn-jdet.vercel.app/

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

 项目地址:

https://github.com/statichunt/hydrogen-nextjs

 https://github.com/briteming/shn

演示博客:

https://shn-jdet.vercel.app/

支持渲染视频. 支持分页

No comments:

Post a Comment