Total Pageviews

Monday, 5 January 2026

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

 

首先fork此项目https://github.com/geekskai/blog,我fork后的项目地址是https://github.com/ymbrite/gkb

然后访问https://github.com/ymbrite/gkb/tree/main/data/blog,新建源帖fh.mdx,内容为:
---
title: "战马"
date: "2026-01-05T00:55:00"
lastmod: "2026-01-05T00:55:00"
tags: ["misc1", "misc2"]
draft: false
images: "/static/images/blog/video/Picture-1.png"
summary: "这是一篇文章"
layout: "PostLayout"
canonicalUrl: "/blog/fh/"
---


此处写视频的嵌入代码

( 详见https://github.com/ymbrite/gkb/blob/main/data/blog/fh.mdx?plain=1)
 然后访问vercel.com/new ,导入项目https://github.com/ymbrite/gkb,( 点击import按钮后,

在跳转到的页面里,要输入环境变量NEXT_PUBLIC_OPENWEATHER_API_KEY 。去https://openweathermap.org/ 注册,登录后,在你的账号页面,即可看到API_KEY的值。)
点击deploy按钮,等待部署完成,部署完成后,我得到网址https://gkb-iota.vercel.app/

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

 项目地址:

https://github.com/geekskai/blog

https://github.com/ymbrite/gkb

演示博客:

https://gkb-iota.vercel.app/

https://gkb-iota.vercel.app/blog/(支持分页)

https://gkb-iota.vercel.app/blog/fh/ 能显示视频

No comments:

Post a Comment