Total Pageviews

Tuesday, 4 August 2026

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

 
首先fork此项目:https://github.com/wisdomekpotu/mdx-nextjs-contentlayer,我fork后,得到的项目地址是https://github.com/briteming/wmnc

访问https://github.com/briteming/wmnc/tree/main/data/articles,在此处新建源帖(即add file),我新建了源帖fh.mdx,内容为:

---
title: 战马
publishedAt: '2026-06-03 19:00:00'
description: 这是一篇文章
seoDescription: 这是一篇文章
category: 'misc'
author:
  {
    name: 'wisdom ekpotu',
    image: 'https://media-exp1.licdn.com/dms/image/C4E03AQHZUYqdunaLzA/profile-displayphoto-shrink_200_200/0/1655124268576?e=1661385600&v=beta&t=12k6HwUxtomaJ_fLEmI5rw0oihKSydkup2U7y5-o0qA',
  }
image: https://images.unsplash.com/photo-1654863075380-5fce8cae1851?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHx0b3BpYy1mZWVkfDMyfGJvOGpRS1RhRTBZfHxlbnwwfHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60'
---

此处写正文或html codes.

( 详见https://github.com/briteming/wmnc/blob/main/data/articles/fh.mdx?plain=1) 

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

  Build Command栏填入yarn build
 Install Command栏填入yarn

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

项目地址:

https://github.com/wisdomekpotu/mdx-nextjs-contentlayer

https://github.com/briteming/wmnc

演示博客:

 https://wmnc.vercel.app/

 https://wmnc.vercel.app/article/fh 能显示视频

 

No comments:

Post a Comment