🚀 快速指南: 🖥️在线预览 / 📝使用文档 / 🍀我的博客
📖 README: 简体中文 | English | 日本語 | Русский
⚡ 静态站点生成: 基于Astro的超快加载速度和SEO优化
🎨 现代化设计: 简洁美观的界面,支持自定义主题色
📱 移动友好: 完美的响应式体验,移动端专项优化
🔧 高度可配置: 大部分功能模块均可通过配置文件自定义
TIP
在重要的布局上,Firefly 创新性地增加了左右双侧边栏、文章网格(多列)布局、瀑布流布局,
增加了站点统计、日历组件、文章目录等小组件,让侧边栏更加丰富,
同时也保留了 fuwari 的布局,可在配置文件中自由切换。
更多布局配置及演示请查看:Firefly 布局系统详解
如果你有好用的功能和优化,请提交 Pull Request
克隆仓库:
git clone https://github.com/Cuteleaf/Firefly.git
cd Firefly
先 Fork 到自己仓库在克隆(推荐)
git clone https://github.com/you-github-name/Firefly.git
cd Firefly
安装依赖:
# 如果没有安装 pnpm,先安装
npm install -g pnpm
# 安装项目依赖
pnpm install
配置博客:
src/config/ 目录下的配置文件自定义博客设置启动开发服务器:
pnpm dev
博客将在 http://localhost:4321 可用
参考官方指南将博客部署至 Vercel, Netlify, GitHub Pages, Cloudflare Pages, EdgeOne Pages 等。
框架预设: Astro
根目录: ./
输出目录: dist
构建命令: pnpm run build
安装命令: pnpm install
📚 详细配置文档: 查看 Firefly使用文档 获取完整的配置指南
要设置博客的默认语言,请编辑 src/config/siteConfig.ts 文件:
// 定义站点语言
const SITE_LANG = "zh_CN";
支持的语言代码:
zh_CN - 简体中文zh_TW - 繁体中文en - 英文ja - 日文ru - 俄文src/ ├── config/ │ ├── index.ts # 配置索引文件 │ ├── siteConfig.ts # 站点基础配置 │ ├── backgroundWallpaper.ts # 背景壁纸配置 │ ├── profileConfig.ts # 用户资料配置 │ ├── commentConfig.ts # 评论系统配置 │ ├── announcementConfig.ts # 公告配置 │ ├── licenseConfig.ts # 许可证配置 │ ├── footerConfig.ts # 页脚配置 │ ├── FooterConfig.html # 页脚HTML内容 │ ├── expressiveCodeConfig.ts # 代码高亮配置 │ ├── sakuraConfig.ts # 樱花特效配置 │ ├── fontConfig.ts # 字体配置 │ ├── sidebarConfig.ts # 侧边栏布局配置 │ ├── navBarConfig.ts # 导航栏配置 │ ├── musicConfig.ts # 音乐播放器配置 │ ├── pioConfig.ts # 看板娘配置 │ ├── adConfig.ts # 广告配置 │ ├── friendsConfig.ts # 友链配置 │ ├── sponsorConfig.ts # 赞助配置 │ └── coverImageConfig.ts # 文章封面图配置
---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg # 或使用 "api" 来启用随机封面图
tags: [Foo, Bar]
category: Front-end
draft: false
lang: zh-CN # 仅当文章语言与 `siteConfig.ts` 中的网站语言不同时需要设置
pinned: false # 置顶
comment: true # 是否允许评论
---
下列指令均需要在项目根目录执行:
| Command | Action |
|---|---|
pnpm install | 安装依赖 |
pnpm dev | 在 localhost:4321 启动本地开发服务器 |
pnpm build | 构建网站至 ./dist/ |
pnpm preview | 本地预览已构建的网站 |
pnpm check | 检查代码中的错误 |
pnpm format | 使用Biome格式化您的代码 |
pnpm new-post <filename> | 创建新文章 |
pnpm astro ... | 执行 astro add, astro check 等指令 |
pnpm astro --help | 显示 Astro CLI 帮助 |
流萤 看板娘切片数据模型本项目遵循 MIT license 开源协议,详细查看 LICENSE 文件
版权声明:
根据 MIT 开源协议,你可以自由使用、修改、分发代码,但需保留上述版权声明。
感谢以下贡献者对本项目做出的贡献,如有问题或建议,请提交 Issue 或 Pull Request。