Total Pageviews

Monday, 16 February 2026

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


首先fork此项目https://github.com/ChristineTham/nextjs-blog,我fork后的项目地址是
https://github.com/ymbrite/ctnb, 
 然后访问https://github.com/ymbrite/ctnb/blob/master/package.json ,把第46行的"next-mdx-remote"的值改为"^6.0.0"
然后访问https://github.com/ymbrite/ctnb/tree/master/posts,新建源帖fh.mdx,内容为:

---
date: '2026-2-16T00:34:00'
type: Article
draft: false
title: 战马
description: 这是一篇文章。
author: ym
featured_image: /drawings/christmas.svg
tags:
  - News
categories:
  - News
---

此处写视频的嵌入代码

( 详见https://github.com/ymbrite/ctnb/blob/master/posts/fh.mdx?plain=1)

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

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

https://ctnb-xzfo.vercel.app/

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

 项目地址:

https://github.com/ChristineTham/nextjs-blog

https://github.com/ymbrite/ctnb

演示博客:https://ctnb-xzfo.vercel.app/

 https://ctnb-xzfo.vercel.app/posts

https://ctnb-xzfo.vercel.app/posts/fh 能显示视频。

No comments:

Post a Comment