Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Firefly 一款清新美观的 Astro 博客主题模板, Firefly is a fresh and visually appealing Astro blog theme template.

License

Notifications You must be signed in to change notification settings

CuteLeaf/Firefly

Repository files navigation

NapCat

Firefly

一款清新美观的 Astro 博客主题模板


🖥️在线预览(Netlify)📝使用文档🍀我的博客

⚡ 静态站点生成: 基于Astro的超快加载速度和SEO优化

🎨 现代化设计: 简洁美观的界面,支持自定义主题色

📱 移动友好: 完美的响应式体验,移动端专项优化

🌟 看板娘支持: 同时支持Spine和Live2D动画引擎

🔧 高度可配置: 大部分功能模块均可通过配置文件自定义

firefly

🚀 快速开始

环境要求

  • Node.js ≤ 22
  • pnpm ≤ 9

本地开发部署

  1. 克隆仓库:

    git clone https://github.com/Cuteleaf/Firefly.git
    cd Firefly
  2. 安装依赖:

    # 如果没有安装 pnpm,先安装
    npm install -g pnpm
    
    # 安装项目依赖
    pnpm install
  3. 配置博客:

    • 编辑 src/config/ 目录下的配置文件自定义博客设置
  4. 启动开发服务器:

    pnpm dev

    博客将在 http://localhost:4321 可用

平台托管部署

  • 参考官方指南将博客部署至 Vercel, Netlify, GitHub Pages 等。

📖 配置说明

📚 详细配置文档: 查看 Firefly使用文档 获取完整的配置指南

配置文件结构

src/
├── config/
│   ├── index.ts              # 配置索引文件
│   ├── siteConfig.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      # 友链配置

⚙️ 文章 Frontmatter

---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
lang: jp      # 仅当文章语言与 `config.ts` 中的网站语言不同时需要设置
---

🧞 指令

下列指令均需要在项目根目录执行:

Command Action
pnpm installpnpm 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 帮助

📄 许可证

本项目采用 MIT 许可证。详见 LICENSE 文件。

🙏 致谢


如有问题或建议,请提交 IssuePull Request

About

Firefly 一款清新美观的 Astro 博客主题模板, Firefly is a fresh and visually appealing Astro blog theme template.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published