- 新增本地搜索分頁配置 (enablePagination, hitsPerPage) - 重構 Algolia 搜索邏輯,支援多索引和更好的錯誤處理 - 優化搜索 UI 樣式,包括分頁按鈕和響應式設計 - 改進搜索結果顯示,新增編號和更好的高亮處理 📦 依賴項更新: - 更新 plugins.yml 中的多個插件版本 (abcjs, algolia, aplayer 等) - 更新 package.json 版本號為 5.5.0 🎨 UI/UX 優化: - 改進側邊欄和目錄的動畫效果 - 優化樣式佈局,調整寬度百分比 - 新增說說頁面的分頁導航組件 - 改進右側邊欄按鈕樣式 🐛 錯誤處理和代碼優化: - 修復 Umami Analytics 的錯誤處理和數據驗證 - 改進懶加載圖片的正則表達式,避免匹配腳本標籤 - 移除未使用的變數和改進代碼結構 - 新增說說內容的 Markdown 渲染支援 🔧 其他改進: - 更新翻譯功能,移除箭頭函數語法以提升相容性
hexo-theme-butterfly
A modern, elegant and feature-rich theme for Hexo
📢 Demo: Butterfly Official | CrazyWong's Blog
📖 Documentation: English Docs | 中文文档
🚀 Quick Start
💾 Installation
Method 1: Git Installation (Recommended)
💡 Tip: If GitHub access is slow in mainland China, you can use the Gitee Mirror
Execute in your Hexo blog root directory:
# Install stable version (recommended)
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
# Install development version (early access to new features)
git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
Method 2: NPM Installation
⚠️ Note: NPM installation only supports Hexo 5.0.0 and above
npm install hexo-theme-butterfly
⚙️ Theme Configuration
- Enable Theme: Modify your Hexo configuration file
_config.yml:
theme: butterfly
- Install Dependencies: If you haven't installed pug and stylus renderers, please run:
npm install hexo-renderer-pug hexo-renderer-stylus --save
✨ Theme Features
🎨 Design Style
- Card-based Design - Modern card-style layout
- Rounded/Square Design - Customizable border styles
- Responsive Design - Perfect adaptation to all screen sizes
- Two-column Layout - Optimized reading experience
- Dark Mode - Eye-friendly night mode
📝 Content Features
- Multi-level Menu - Support for secondary navigation menus
- Reading Mode - Focused article reading experience
- TOC Navigation - Desktop and mobile TOC support
- Word Count - Display article word count and reading time
- Related Articles - Smart recommendation of related content
- Outdated Reminder - Automatic article update status alerts
- Traditional/Simplified Chinese - Support for Traditional and Simplified Chinese switching
- Tag Plugins - Rich tag plugin support
🔍 Search & Navigation
- Multiple Search Options - Algolia Search / Local Search / Docsearch
- Built-in 404 - Beautiful 404 error page
- Pjax Support - Smooth page transition experience
🎨 Code Display
- Syntax Highlighting - Built-in multiple themes (darker/pale night/light/ocean)
- Code Features - Language display/fold expand/copy button/auto-wrap
- Math Formulas - Support for Mathjax and Katex
💬 Social Interaction
- Multiple Comment Systems - Disqus/Gitalk/Valine/Waline/Twikoo/Giscus/Artalk etc.
- Dual Comments Support - Enable two comment systems simultaneously
- Share Features - Sharejs/Addtoany sharing components
- Live Chat - Chatra/Tidio/Crisp instant messaging
📊 Analytics & Statistics
- Visit Statistics - Busuanzi counter
- Site Analytics - Google Analytics/Baidu Analytics/Cloudflare Analytics/Microsoft Clarity/Umami
- Webmaster Verification - Major search engine verification
- Ad Support - Google AdSense/custom ad slots
🎪 Visual Effects
- Typing Effects - activate_power_mode animations
- Background Effects - Static ribbons/dynamic ribbons/floating ribbons/Canvas Nest
- Mouse Effects - Fireworks/hearts/text click effects
- Loading Animations - Preloader and pace.js progress bars
- Image Effects - Medium Zoom/Fancybox image lightbox
- Lazy Loading - Image lazy loading optimization
🛠️ Advanced Features
- PWA Support - Progressive Web App
- Copy Protection - Disable text copying/copyright info append
- Theme Customization - Custom site color schemes
- Chart Support - Mermaid flowcharts/Chart.js data charts
- Music Notation - ABCJS music notation support
- Music Player - APlayer/Meting music playback
- Article Series - Series article organization
- Instantpage - Page preloading acceleration
- Snackbar - Elegant notification messages
🤝 Contributors
Thanks to all the developers who have contributed to the Butterfly theme!
📸 Screenshots
⭐ Star History
🤝 Building a Better Theme Together
We believe the power of open source comes from everyone's participation! Whether you're a developer, designer, or user, you can contribute to the development of the Butterfly theme.
💬 Get Help & Support
- 🐛 Found a bug? → GitHub Issues - Let's solve it together!
- 💡 Have ideas? → GitHub Discussions - Share your creative ideas!
- 📚 Learning to use? → Official Documentation - Detailed usage guide
- 💬 Real-time discussion? → Telegram Group - Chat with community members
🎯 Contributing
Want to make Butterfly better? We welcome any form of contribution:
- 🔧 Code Contributions - Fix bugs, add new features, optimize performance
- 📝 Documentation - Improve docs, translate content, write tutorials
- 🎨 Design Suggestions - UI/UX improvements, theme colors, icon design
- 🧪 Testing & Feedback - Test new features, report issues, provide user experience
- 💰 Financial Support - Sponsor the Project - Support long-term development
📄 License
This project is licensed under the Apache 2.0 License.
🙏 Acknowledgments
This theme is developed based on hexo-theme-melody. Thanks to the original author for their excellent work that provided inspiration and foundation!
Thanks to all friends who have contributed to the development of the Butterfly theme. Your support has made this theme continuously improve and progress.
✨ If this theme helps you, please give us a ⭐ Star! ✨




