Total Pageviews

Friday, 26 December 2025

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

 

首先fork此项目https://github.com/AnthonyNet/nextJS_blog,我fork后的项目地址是https://github.com/briteming/annb,
然后访问https://github.com/briteming/annb/tree/main/posts,新建源帖cg-fh.md , (之所以要命名为cg-fh.md ,是因为这个静态博客程序annb的帖子按字母顺序排列,而这个列表
https://github.com/briteming/annb/tree/main/posts的最上面的源帖的名称是chick_melancholic.md)
 内容为:

---
layout:  "../../layouts/BookPost.astro" 
title: 战马
date: "2025-12-26"
imgUrl: chick_melancholic.jpg
---


此处写视频的嵌入代码

( 详见https://github.com/briteming/annb/blob/main/posts/cg-fh.md?plain=1)。这里,虽然date参数的值为

2025-12-26,但如果在其后加上T10:00:00 ,想让帖子按时间顺序发表是不起作用的。

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

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

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

 项目地址:

https://github.com/AnthonyNet/nextJS_blog

https://github.com/briteming/annb

演示博客:

https://annb.vercel.app/

 https://annb.vercel.app/posts/cg-fh 能显示视频

 

No comments:

Post a Comment