Total Pageviews

Monday, 28 September 2026

muse替我在cloudflare.com平台构建基于nextjs的静态博客程序wnbt


 我用github a/c: luckypoem@gmail.com登录cloudflare.com后,导入仓库https://github.com/brightmann/wnbt, 试图让cloudflare平台build这个项目. 虽然build成功,但是生成的帖子却不显示内容。

 于是,我又让muse来帮我构建这个静态博客程序。下面的插图就是我跟它的对话过程,共 11张插图.


 



 







项目地址:

https://github.com/wwebdev/nextjs-blog-template

 https://github.com/wwebdev/nextjs-blog-template/issues/2

https://github.com/brightmann/wnbt

https://github.com/brightmann/wnbt/tree/main/pages/blog ,在此处创建源帖fh.js文件,内容为:

import Link from 'next/link'
import PostLayout from '../../components/Layout/PostLayout'

// defines the basic layout of posts with the /blog route
const Post = () => {
  return <PostLayout>
    
<p>
此处写正文或html codes.
</p>

  </PostLayout>
}

export default Post

访问 https://github.com/brightmann/wnbt/blob/main/content/posts.js ,在顶部的

{...),段落的上面加上:

{
    title: '战马',
    description: '这是一篇文章',
    image: '/posts/post1.jpg',
    link: '/blog/fh',
    categories: ['main'], // specifies where it will be rendered
    date: 'June 07 2026' // optional
  },

这样,源帖就创建好了,然后静候cloudflare.com平台部署完成。部署完成后,我得到网址:

 https://wnbt.luckypoem.workers.dev/

 https://wnbt.luckypoem.workers.dev/blog/fh  能显示视频。

(https://wnbt.vercel.app/)

 

No comments:

Post a Comment