Compare commits

...
104 Commits
101 changed files with 5055 additions and 2713 deletions

No files matched your search

+1 -1
View File
@@ -10,4 +10,4 @@ liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['https://buy.stripe.com/3cs6rP6YA91sbbG5kk','https://jsd.012700.xyz/gh/jerryc127/CDN/Photo/wechat.jpg'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] custom: ['https://buy.stripe.com/3cs6rP6YA91sbbG5kk'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+12 -4
View File
@@ -3,17 +3,25 @@ name: npm publish
on: on:
release: release:
types: [created] types: [created]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # OIDC 必須
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
# Setup .npmrc file to publish to npm # Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1 - uses: actions/setup-node@v4
with: with:
node-version: '12.x' node-version: '20.x'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- run: npm install - run: npm install
- run: npm publish
- run: npm publish --provenance --access public
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+192 -117
View File
@@ -1,117 +1,192 @@
<div align="right"> <div align="right">
<a title="Chinese" href="/README_CN.md">中文</a> <a title="中文" href="/README_CN.md">中文</a>
</div> </div>
<div align="center"> <div align="center">
<img src="./source/img/butterfly-icon.png" width="150" height="150" /> <img src="./source/img/butterfly-icon.png" width="150" height="150" alt="Butterfly Logo" />
# hexo-theme-butterfly # hexo-theme-butterfly
![master version](https://img.shields.io/github/package-json/v/jerryc127/hexo-theme-butterfly/master?color=%231ab1ad&label=master) A modern, elegant and feature-rich theme for Hexo
![master version](https://img.shields.io/github/package-json/v/jerryc127/hexo-theme-butterfly/dev?label=dev)
![https://img.shields.io/npm/v/hexo-theme-butterfly?color=%09%23bf00ff](https://img.shields.io/npm/v/hexo-theme-butterfly?color=%09%23bf00ff) ![master version](https://img.shields.io/github/package-json/v/jerryc127/hexo-theme-butterfly/master?color=%231ab1ad&label=master)
![hexo version](https://img.shields.io/badge/hexo-5.3.0+-0e83c) ![dev version](https://img.shields.io/github/package-json/v/jerryc127/hexo-theme-butterfly/dev?label=dev)
![license](https://img.shields.io/github/license/jerryc127/hexo-theme-butterfly?color=FF5531) ![npm version](https://img.shields.io/npm/v/hexo-theme-butterfly?color=%09%23bf00ff)
![hexo version](https://img.shields.io/badge/hexo-5.3.0+-0e83cd)
📢 Demo: [Butterfly](https://butterfly.js.org/) / [CrazyWong](https://blog.crazywong.com/) ![license](https://img.shields.io/github/license/jerryc127/hexo-theme-butterfly?color=FF5531)
![GitHub stars](https://img.shields.io/github/stars/jerryc127/hexo-theme-butterfly?style=social)
📖 Docs: [English](https://butterfly.js.org/en/posts/butterfly-docs-en-get-started/) / [Chinese](https://butterfly.js.org/posts/21cfbf15/)
📢 **Demo**: [Butterfly Official](https://butterfly.js.org/) | [CrazyWong's Blog](https://blog.crazywong.com/)
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/theme-butterfly-readme.png)
📖 **Documentation**: [English Docs](https://butterfly.js.org/en/posts/butterfly-docs-en-get-started/) | [中文文档](https://butterfly.js.org/posts/21cfbf15/)
</div>
![Butterfly Theme Preview](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/theme-butterfly-readme.png)
---
</div>
## 💻 Installation
---
### GIT
## 🚀 Quick Start
> If you are in Mainland China, you can download in [Gitee](https://gitee.com/immyw/hexo-theme-butterfly.git)
### 💾 Installation
Stable branch [recommend]:
#### Method 1: Git Installation (Recommended)
```
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly > 💡 **Tip**: If GitHub access is slow in mainland China, you can use the [Gitee Mirror](https://gitee.com/immyw/hexo-theme-butterfly.git)
```
Execute in your Hexo blog root directory:
Dev branch:
```bash
``` # Install stable version (recommended)
git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
``` ```
### NPM ```bash
# Install development version (early access to new features)
> It supports Hexo 5.0.0 or later git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
```
In Hexo site root directory
#### Method 2: NPM Installation
```powershell
npm i hexo-theme-butterfly > ⚠️ **Note**: NPM installation only supports Hexo 5.0.0 and above
```
```bash
## ⚙ Configuration npm install hexo-theme-butterfly
```
Set theme in the hexo work folder's root config file `_config.yml`:
### ⚙️ Theme Configuration
> theme: butterfly
1. **Enable Theme**: Modify your Hexo configuration file `_config.yml`:
If you don't have pug & stylus renderer, try this:
```yaml
> npm install hexo-renderer-pug hexo-renderer-stylus theme: butterfly
```
## 🎉 Features
2. **Install Dependencies**: If you haven't installed pug and stylus renderers, please run:
- [x] Card UI Design
- [x] Rounded Design/Squared Design ```bash
- [X] Support sub-menu npm install hexo-renderer-pug hexo-renderer-stylus --save
- [x] Two-column layout ```
- [x] Responsive Web Design
- [x] Dark Mode ## ✨ Theme Features
- [x] Pjax
- [x] Read Mode ### 🎨 Design Style
- [x] Conversion between Traditional and Simplified Chinese - [x] **Card-based Design** - Modern card-style layout
- [X] TOC catalog is available for both computers and mobile phones - [x] **Rounded/Square Design** - Customizable border styles
- [X] Built-in Syntax Highlighting Themes (darker/pale night/light/ocean), also support customization - [x] **Responsive Design** - Perfect adaptation to all screen sizes
- [X] Code Blocks (Display code language/close or expand Code Blocks/Copy Button/word wrap) - [x] **Two-column Layout** - Optimized reading experience
- [X] Disable copy/Add a Copyright Notice to the Copied Text - [x] **Dark Mode** - Eye-friendly night mode
- [X] Search (Algolia Search/Local Search)
- [x] Mathjax and Katex ### 📝 Content Features
- [x] Built-in 404 page - [x] **Multi-level Menu** - Support for secondary navigation menus
- [x] WordCount - [x] **Reading Mode** - Focused article reading experience
- [x] Related articles - [x] **TOC Navigation** - Desktop and mobile TOC support
- [x] Displays outdated notice for a post - [x] **Word Count** - Display article word count and reading time
- [x] Share (Sharejs/Addtoany) - [x] **Related Articles** - Smart recommendation of related content
- [X] Comment (Disqus/Disqusjs/Livere/Gitalk/Valine/Waline/Utterances/Facebook Comments/Twikoo/Giscus/Remark42/artalk) - [x] **Outdated Reminder** - Automatic article update status alerts
- [x] Multiple Comment System Support - [x] **Traditional/Simplified Chinese** - Support for Traditional and Simplified Chinese switching
- [x] Online Chats (Chatra/Tidio/Crisp) - [x] **Tag Plugins** - Rich tag plugin support
- [x] Web analytics
- [x] Google AdSense ### 🔍 Search & Navigation
- [x] Webmaster Verification - [x] **Multiple Search Options** - Algolia Search / Local Search / Docsearch
- [x] Change website colour scheme - [x] **Built-in 404** - Beautiful 404 error page
- [x] Typewriter Effect: activate_power_mode - [x] **Pjax Support** - Smooth page transition experience
- [x] Background effects (Canvas ribbon/canvas_ribbon_piao/canvas_nest)
- [x] Mouse click effects (Fireworks/Heart/Text) ### 🎨 Code Display
- [x] Preloader/Loading Animation/pace.js - [x] **Syntax Highlighting** - Built-in multiple themes (darker/pale night/light/ocean)
- [x] Busuanzi visitor counter - [x] **Code Features** - Language display/fold expand/copy button/auto-wrap
- [x] Medium Zoom/Fancybox - [x] **Math Formulas** - Support for Mathjax and Katex
- [x] Mermaid
- [x] Chart.js ### 💬 Social Interaction
- [x] Justified Gallery - [x] **Multiple Comment Systems** - Disqus/Gitalk/Valine/Waline/Twikoo/Giscus/Artalk etc.
- [x] Lazyload images - [x] **Dual Comments Support** - Enable two comment systems simultaneously
- [x] Instantpage/Snackbar notification toast/PWA...... - [x] **Share Features** - Sharejs/Addtoany sharing components
- [x] **Live Chat** - Chatra/Tidio/Crisp instant messaging
## ✨ Contributors
### 📊 Analytics & Statistics
<a href="https://github.com/jerryc127/hexo-theme-butterfly/graphs/contributors"> - [x] **Visit Statistics** - Busuanzi counter
<img src="https://contrib.rocks/image?repo=jerryc127/hexo-theme-butterfly" /> - [x] **Site Analytics** - Google Analytics/Baidu Analytics/Cloudflare Analytics/Microsoft Clarity/Umami
</a> - [x] **Webmaster Verification** - Major search engine verification
- [x] **Ad Support** - Google AdSense/custom ad slots
## 📷 Screenshots
### 🎪 Visual Effects
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-1.jpg) - [x] **Typing Effects** - activate_power_mode animations
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-2.jpg) - [x] **Background Effects** - Static ribbons/dynamic ribbons/floating ribbons/Canvas Nest
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-3.jpg) - [x] **Mouse Effects** - Fireworks/hearts/text click effects
![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-4.jpg) - [x] **Loading Animations** - Preloader and pace.js progress bars
- [x] **Image Effects** - Medium Zoom/Fancybox image lightbox
- [x] **Lazy Loading** - Image lazy loading optimization
### 🛠️ Advanced Features
- [x] **PWA Support** - Progressive Web App
- [x] **Copy Protection** - Disable text copying/copyright info append
- [x] **Theme Customization** - Custom site color schemes
- [x] **Chart Support** - Mermaid flowcharts/Chart.js data charts
- [x] **Music Notation** - ABCJS music notation support
- [x] **Article Series** - Series article organization
- [x] **Instantpage** - Page preloading acceleration
- [x] **Snackbar** - Elegant notification messages
## 🤝 Contributors
Thanks to all the developers who have contributed to the Butterfly theme!
[![Contributors](https://contrib.rocks/image?repo=jerryc127/hexo-theme-butterfly)](https://github.com/jerryc127/hexo-theme-butterfly/graphs/contributors)
## 📸 Screenshots
<div align="center">
![Theme Demo](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-1.jpg)
![Theme Demo](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-2.jpg)
![Theme Demo](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-3.jpg)
![Theme Demo](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-4.jpg)
</div>
## ⭐ Star History
[![Star History Chart](https://api.star-history.com/svg?repos=jerryc127/hexo-theme-butterfly&type=Date)](https://star-history.com/#jerryc127/hexo-theme-butterfly&Date)
## 🤝 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](https://github.com/jerryc127/hexo-theme-butterfly/issues) - Let's solve it together!
- 💡 **Have ideas?** → [GitHub Discussions](https://github.com/jerryc127/hexo-theme-butterfly/discussions) - Share your creative ideas!
- 📚 **Learning to use?** → [Official Documentation](https://butterfly.js.org/) - Detailed usage guide
- 💬 **Real-time discussion?** → [Telegram Group](https://t.me/bu2fly) - 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](https://buy.stripe.com/3cs6rP6YA91sbbG5kk) - Support long-term development
## 📄 License
This project is licensed under the [Apache 2.0](LICENSE) License.
## 🙏 Acknowledgments
This theme is developed based on [hexo-theme-melody](https://github.com/Molunerfinn/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.
---
<div align="center">
**✨ If this theme helps you, please give us a ⭐ Star! ✨**
</div>
Loaded 3 of 101 files, more files were not shown because too many files have changed in this diff. Show more