Total Pageviews

Saturday, 29 November 2025

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


首先fork此项目https://github.com/sub-t/next-mdx-site,我fork后的项目地址是https://github.com/briteming/snms,然后访问https://github.com/briteming/snms/blob/main/.env ,修改 .env文件的值为:
NEXT_PUBLIC_ROOT_URL=/
NEXT_PUBLIC_BASE_PATH=""
然后访问https://github.com/briteming/snms/tree/main/data/blog/posts,新建源帖test.mdx,内容为

---
title: 测试
description: 这是一篇文章
image: '/blog/posts/nextjs.png'
date: '2025-11-29T14:21:00'
author: ym
tags:
  - 'misc1'
  - 'misc2'
---

这是测试。

看看如何?

( 详见https://github.com/briteming/snms/blob/main/data/blog/posts/test.mdx?plain=1)

 然后访问vercel.com/new ,导入项目https://github.com/briteming/snms,点击deploy按钮,等待部署完成,部署完成后,我得到网址https://snms.vercel.app

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

 项目地址:

 https://github.com/sub-t/next-mdx-site

 https://github.com/briteming/snms

演示博客:

  https://snms.vercel.app

 https://snms.vercel.app/blog/page/1/   (支持分页)

 

No comments:

Post a Comment