Total Pageviews

Saturday, 6 December 2025

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

 访问https://vercel.com/templates/blog/nextjs-contentlayer,点击deploy按钮,或直接访问

 https://vercel.com/new/clone?project-name=Next.js+Contentlayer+Blog+Starter&repository-name=nextjs-contentlayer&repository-url=https://github.com/shadcn/next-contentlayer,在打开的页面里,把Private Repository改为Public Repository, 然后点击create按钮,就开始部署该博客了,部署完成后,我得到网址https://nextjs-contentlayer-rho-sepia.vercel.app/ .

因为刚才,我把vercel.com在我的github账号briteming里创建的私有仓库改为了公开,所以任何人都可访问https://github.com/briteming/nextjs-contentlayer,

然后我们访问https://github.com/briteming/nextjs-contentlayer/tree/main/content/posts,在此新建源帖test.mdx ,内容为:

---
title: 测试
description: 这是一篇文章
date: "2025-12-06T12:55:00"
---

这是测试,

 (详见https://github.com/briteming/nextjs-contentlayer/blob/main/content/posts/test.mdx?plain=1)

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

 项目地址:

https://github.com/shadcn/next-contentlayer

 https://github.com/briteming/nextjs-contentlayer

演示博客:

 https://nextjs-contentlayer-rho-sepia.vercel.app/ 

 https://nclb.vercel.app/  (在vercel.com,登录我的账号后,可以在nextjs-contentlayer-rho-sepia.vercel.app上,停放(绑定)新的域名:nclb.vercel.app

 

No comments:

Post a Comment