首先fork此项目:https://github.com/tiivik/nextjs-mdx-blog,我fork后,得到的项目地址是
https://github.com/brightmann/nmb ,
访问https://github.com/brightmann/nmb/tree/master/pages/blog,在这里,新建源帖fh.mdx,内容为:
import { PostLayout } from "../../components/Layout";
export const meta = {
title: "战马",
description: "这是一篇文章",
icon: "🐖",
slug: "/blog/fh"
};
<PostLayout>
# 战马
</PostLayout>
此处写正文或html codes.
( 详见https://github.com/brightmann/nmb/blob/master/pages/blog/fh.mdx?plain=1)
然后,访问vercel.com/new ,导入项目https://github.com/brightmann/nmb
Build Command栏填入yarn build
Install Command栏填入yarn
然后点击底部的deploy按钮,等待部署完成。部署完成后,我得到网址:
https://nmb-five.vercel.app/
项目地址:
https://github.com/tiivik/nextjs-mdx-blog
https://github.com/brightmann/nmb
演示博客:
https://nmb-five.vercel.app/ ,帖子从上到下,按字母顺序排列。
https://nmb-five.vercel.app/blog/fh 能显示视频
No comments:
Post a Comment