Astro-Fuwari主题配置 发表于 2025-07-24 分类于 Astro Waline: 阅读次数: 摘要: Astro-Fuwari主题配置项目主页https://github.com/saicaca/fuwari文档https://github.com/saicaca/fuwari/blob/main/docs/README.zh-CN.md环境要求Node.js <= 22pnpm <= 9安装git scm https://git-scm.com/12安装pnpmnpm install -g pnpm@9.15.9下载代码使用右上角template模版到自己仓库, 并克隆代码到本地123安装依赖pnpm installpnpm add sharp配置1通过配置文件 src/config.ts 自定义博客指令下列指令均需要在项目根目录执行:CommandActionpnpm install 并 pnpm add sharp安装依赖pnpm dev在 localhost:4321 启动本地开发服务器pnpm build构建网站至 ./dist/pnpm preview本地预览已构建的网站pnpm new-post <filename>创建新文章pnpm astro ...执行 astro add, astro check 等指令pnpm astro --help显示 Astro CLI 帮助写作1执行 pnpm new-post <filename> 创建新文章,并在 src/content/posts/ 目录中编辑12345678910---title: My First Blog Postpublished: 2023-09-09description: This is the first post of my new Astro blog.image: ./cover.jpgtags: [Foo, Bar]category: Front-enddraft: falselang: jp # 仅当文章语言与 `config.ts` 中的网站语言不同时需要设置---部署cloudflare pages1署前需编辑 astro.config.mjs 中的站点设置。构建命令1pnpm run build输出目录1dist