Firefly
# Firefly > A Fresh and Beautiful Astro Static Blog Theme Template > > ![Node.js >= 22](https://img.shields.io/badge/node.js-%3E%3D22-brightgreen) ![pnpm >= 9](https://img.shields.io/badge/pnpm-%3E%3D9-blue) ![Astro](https://img.shields.io/badge/Astro-7.1.3-orange) ![TypeScript](https://img.shields.io/badge/TypeScript-5.9.2-blue) > > [![Stars](https://img.shields.io/github/stars/CuteLeaf/Firefly?style=social)](https://github.com/CuteLeaf/Firefly/stargazers) [![Forks](https://img.shields.io/github/forks/CuteLeaf/Firefly?style=social)](https://github.com/CuteLeaf/Firefly/network/members) [![Issues](https://img.shields.io/github/issues/CuteLeaf/Firefly)](https://github.com/CuteLeaf/Firefly/issues) > > [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Z8Z41NQALY) > > **QQไบคๆต็พค๏ผš[1087127207](https://qm.qq.com/q/ZGsFa8qX2G)** > > ![GitHub License](https://img.shields.io/github/license/CuteLeaf/Firefly) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/CuteLeaf/Firefly) [![Afdian Sponsor](https://img.shields.io/badge/Afdian-Sponsor%20Author-ff69b4.svg)](https://ifdian.net/a/cuteleaf)
--- ๐Ÿ“– README: **[็ฎ€ไฝ“ไธญๆ–‡](README.md)** | **[็น้ซ”ไธญๆ–‡](docs/README.zh-TW.md)** | **[English](README.en.md)** | **[ๆ—ฅๆœฌ่ชž](docs/README.ja.md)** ๐Ÿš€ Quick Guide: [**๐Ÿ–ฅ๏ธLive Demo**](https://firefly.cuteleaf.cn/) / [**๐Ÿ“Documentation**](https://docs-firefly.cuteleaf.cn/) / [**๐Ÿ€My Blog**](https://blog.cuteleaf.cn) โšก Static Site Generation: Ultra-fast loading speed and SEO optimization based on Astro ๐ŸŽจ Modern Design: Clean and beautiful interface with customizable theme colors ๐Ÿ“ฑ Mobile-Friendly: Perfect responsive experience with mobile-specific optimizations ๐Ÿ”ง Highly Configurable: Most features can be customized through configuration files

Banner Mode

Overlay Mode

Fullscreen Wallpaper Mode

Solid Color Mode
Lighthouse >[!TIP] > >Firefly is a fresh, beautiful, and modern personal blog theme template based on the Astro framework and the Fuwari template, designed for tech enthusiasts and content creators. It integrates a modern web tech stack, offering rich feature modules and a highly customizable interface so you can easily build a professional and visually appealing personal blog. > >**If you refer to or use Firefly component design and related code, please credit Firefly.** > >Firefly also preserves the original fuwari layout, which can be freely switched in the configuration file according to your preferences. > >**For more layout configurations and demos, please see: [Firefly Layout System Details](https://firefly.cuteleaf.cn/posts/guide/firefly-layout-system/)** > >Firefly supports i18n multilingual UI, but except for Simplified Chinese, other languages are AI-translated. If you find any errors, feel free to submit a [Pull Request](https://github.com/CuteLeaf/Firefly/pulls) to help improve them. ## โœจ Features ### Core Features - [x] **Astro + Tailwind CSS** - Ultra-fast static site generation based on modern tech stack - [x] **Smooth Animations** - Swup page transition animations for silky smooth browsing experience - [x] **Responsive Design** - Perfect adaptation for desktop, tablet and mobile devices - [x] **Multi-language Support** - i18n internationalization ui, supports Simplified Chinese, Traditional Chinese, English, Japanese, Russian, Korean - [x] **Full-text Search** - Client-side search based on Pagefind, supports article content indexing. ### Personalization - [x] **Dynamic Sidebar** - Supports single sidebar, dual sidebar configuration - [x] **Article Layout** - Supports list (single column) and grid (multi-column/masonry) layout - [x] **Font Management** - Custom font support with rich font selector - [x] **Footer Configuration** - HTML content injection, fully customizable - [x] **Light/Dark Mode** - Supports light/dark/system three modes - [x] **Navbar Customization** - Logo, title, links fully customizable - [x] **Wallpaper Mode Switching** - Banner wallpaper, fullscreen wallpaper, fullscreen transparent wallpaper, solid background - [x] **Theme Color Customization** - 360ยฐ hue adjustment If you have useful features and optimizations, please submit a [Pull Request](https://github.com/CuteLeaf/Firefly/pulls) ## ๐Ÿš€ Quick Start ### Requirements - Node.js โ‰ฅ 22 - pnpm โ‰ฅ 9 ### Local Development 1. **Clone the repository:** ```bash git clone https://github.com/Cuteleaf/Firefly.git cd Firefly ``` **First [Fork](https://github.com/CuteLeaf/Firefly/fork) to your own repository then clone (recommended). Don't forget to Star before Fork!** ```bash git clone https://github.com/you-github-name/Firefly.git cd Firefly ``` 3. **Install dependencies:** ```bash # Install pnpm if not installed npm install -g pnpm # Install project dependencies pnpm install ``` 4. **Configure blog:** - Edit configuration files in `src/config/` directory to customize blog settings 5. **Start development server:** ```bash pnpm dev ``` Blog will be available at `http://localhost:4321` ### Platform Hosting Deployment - **Refer to the [official guide](https://docs.astro.build/en/guides/deploy/) to deploy your blog to Vercel, Netlify, Cloudflare Pages, EdgeOne Pages, etc.** - **Vercel**, **Netlify** and other major platforms auto-deploy, automatically selecting the appropriate adapter based on the environment. Framework Preset: `Astro` Root Directory: `./` Output Directory: `dist` Build Command: `pnpm run build` Install Command: `pnpm install` [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/CuteLeaf/Firefly&project-name=Firefly&repository-name=Firefly) [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/CuteLeaf/Firefly) ## ๐Ÿ“– Configuration > ๐Ÿ“š **Detailed Configuration Documentation**: Check [Firefly Documentation](https://docs-firefly.cuteleaf.cn/) for complete configuration guide ### Setting Website Language To set the default language for your blog, edit the `src/config/siteConfig.ts` file: ```typescript // Define site language const SITE_LANG = "zh_CN"; ``` **Supported language codes:** - `zh_CN` - Simplified Chinese - `zh_TW` - Traditional Chinese - `en` - English - `ja` - Japanese - `ru` - Russian - `ko` - Korean ### Configuration File Structure ``` src/ โ”œโ”€โ”€ config/ โ”‚ โ”œโ”€โ”€ index.ts # Configuration index file โ”‚ โ”œโ”€โ”€ siteConfig.ts # Site basic configuration โ”‚ โ”œโ”€โ”€ analyticsConfig.ts # Analytics configuration โ”‚ โ”œโ”€โ”€ announcementConfig.ts # Announcement configuration โ”‚ โ”œโ”€โ”€ backgroundWallpaper.ts # Background wallpaper configuration โ”‚ โ”œโ”€โ”€ commentConfig.ts # Comment system configuration โ”‚ โ”œโ”€โ”€ coverImageConfig.ts # Cover image configuration โ”‚ โ”œโ”€โ”€ displaySettingsConfig.ts # Settings panel configuration โ”‚ โ”œโ”€โ”€ dynamicConfig.ts # Moments page configuration โ”‚ โ”œโ”€โ”€ effectsConfig.ts # Animation effects config (sakura, etc.) โ”‚ โ”œโ”€โ”€ expressiveCodeConfig.ts # Code highlighting configuration โ”‚ โ”œโ”€โ”€ fontConfig.ts # Font configuration โ”‚ โ”œโ”€โ”€ footerConfig.ts # Footer configuration โ”‚ โ”œโ”€โ”€ friendsConfig.ts # Friend links configuration โ”‚ โ”œโ”€โ”€ galleryConfig.ts # Gallery configuration โ”‚ โ”œโ”€โ”€ licenseConfig.ts # License configuration โ”‚ โ”œโ”€โ”€ musicConfig.ts # Music player configuration โ”‚ โ”œโ”€โ”€ navBarConfig.ts # Navbar configuration โ”‚ โ”œโ”€โ”€ pioConfig.ts # Mascot configuration โ”‚ โ”œโ”€โ”€ mermaidConfig.ts # Mermaid diagram configuration โ”‚ โ”œโ”€โ”€ plantumlConfig.ts # PlantUML diagram configuration โ”‚ โ”œโ”€โ”€ profileConfig.ts # User profile configuration โ”‚ โ”œโ”€โ”€ sidebarConfig.ts # Sidebar layout configuration โ”‚ โ””โ”€โ”€ sponsorConfig.ts # Sponsor configuration ``` ## โš™๏ธ Article Frontmatter ```yaml --- title: My First Blog Post published: 2023-09-09 description: This is the first post of my new Astro blog. image: ./cover.jpg # Or use "api" to enable random cover images tags: [Foo, Bar] category: Front-end draft: false lang: zh-CN # Only set when article language differs from site language in `siteConfig.ts` pinned: false # Pin article comment: true # Enable comments --- ``` ## Moments Moment files are stored in `src/content/dynamic/`, with one Markdown file per moment. Create one with: ```bash pnpm new-d The weather is lovely today ``` `pnpm new-dynamic ` is the equivalent full command. ```yaml --- published: 2026-07-15 16:15:29 pinned: true # Pin article location: China # Location --- Moment content supports Markdown. ``` Also supports [Memos](https://www.usememos.com/) as a data source. Configure the `memos` option in `src/config/dynamicConfig.ts` to fetch Memos moments in real-time, with pinned sync and image attachment support. See [Moments documentation](https://docs-firefly.cuteleaf.cn/en/guide/dynamic.html). ## ๐Ÿ“– Markdown Extensions In addition to the default [GitHub Flavored Markdown](https://github.github.com/gfm/) support in Astro, there are some additional Markdown features: - Admonitions - Supports configuration for GitHub, Obsidian, VitePress, and Docusaurus themes ([Preview and Usage](https://firefly.cuteleaf.cn/posts/markdown-extended/)) - GitHub Repository Cards ([Preview and Usage](https://firefly.cuteleaf.cn/posts/markdown-extended/)) - Enhanced Code Blocks based on Expressive Code ([Preview](http://firefly.cuteleaf.cn/posts/code-examples/) / [Documentation](https://expressive-code.com/)) ## ๐Ÿงž Commands All commands need to be executed in the project root directory: | Command | Action | |:---------------------------|:----------------------------------------------------| | `pnpm install` | Install dependencies | | `pnpm dev` | Start local development server at `localhost:4321` | | `pnpm build` | Build site to `./dist/` | | `pnpm preview` | Preview built site locally | | `pnpm check` | Check for errors in code | | `pnpm format` | Format your code using Biome | | `pnpm new-post ` | Create new article | | `pnpm new-d ` | Create a new moment | | `pnpm new-dynamic ` | Create a new moment (full command) | | `pnpm astro ...` | Execute `astro add`, `astro check` and other commands | | `pnpm astro --help` | Display Astro CLI help | ## ๐Ÿ™ Acknowledgments Special thanks to [saicaca](https://github.com/saicaca) for developing the [fuwari](https://github.com/saicaca/fuwari) template, which Firefly is based on for secondary development. The copyright of Firefly-related image assets belongs to [miHoYo](https://www.mihoyo.com/), the developer of the game ["Honkai: Star Rail"](https://sr.mihoyo.com/). ### Tech Stack - [Astro](https://astro.build) - [Tailwind CSS](https://tailwindcss.com) - [Iconify](https://iconify.design) ### Inspiration Projects - [fuwari](https://github.com/saicaca/fuwari) - [hexo-theme-shoka](https://github.com/amehime/hexo-theme-shoka) - [astro-koharu](https://github.com/cosZone/astro-koharu) - [Mizuki](https://github.com/matsuzaka-yuki/Mizuki) ### Other References - Blogger `้œž่‘‰` [Bangumi Collection](https://kasuha.com/posts/fuwari-enhance-ep2/) page component - Bilibili creator `ๅ…ฌๅ…ฌ็š„ๆ—ฅๅธธ` Q-version [Firefly Mascot Spine Model](https://www.bilibili.com/video/BV1fuVzzdE5y) ## ๐Ÿ“ License This project is licensed under the [MIT license](https://mit-license.org/). See the [LICENSE](./LICENSE) file for details. Originally forked from [saicaca/fuwari](https://github.com/saicaca/fuwari). Thanks to the original author for their contributions. **Copyright Notice:** - Copyright (c) 2024 [saicaca](https://github.com/saicaca) - [fuwari](https://github.com/saicaca/fuwari) - Copyright (c) 2025 [CuteLeaf](https://github.com/CuteLeaf) - [Firefly](https://github.com/CuteLeaf/Firefly) Under the MIT license, you are free to use, modify, and distribute the code, but you must retain the above copyright notice. ## ๐Ÿ€ Contributors Thanks to the following contributors for their contributions to this project. If you have any questions or suggestions, please submit an [Issue](https://github.com/CuteLeaf/Firefly/issues) or [Pull Request](https://github.com/CuteLeaf/Firefly/pulls). > > > Thanks to the following contributors for their contributions to the original project [fuwari](https://github.com/saicaca/fuwari), which laid the foundation for this project. > > > ## โญ Star History [![Star History Chart](https://api.star-history.com/svg?repos=CuteLeaf/Firefly&type=Date)](https://star-history.com/#CuteLeaf/Firefly&Date)