This article is translated from ChatGPT.
๐ Table of Contents
๐ Get Started - ๐ Theme Pages - ๐ Theme Configuration - โ๏ธ Tag Plugins - โ Q&A - โก๏ธ Advanced Tutorials
Tag plugins are a unique feature of Hexo and are not part of the standard Markdown format.
The following syntax is only applicable to the Butterfly theme. It will not work on other themes and may even cause errors. Please be aware before using it.
Although tag plugins can provide additional functionality and UI enhancements to the theme, they also come with notable limitations. Please be mindful when using them.
Note (Bootstrap Callout)
Ported from the Next theme and modified.
1 | note: |
| Name | Description |
|---|---|
| style | [Optional] Tag style (simple/modern/flat/disabled) |
| icons | [Optional] Whether to display icons |
| border_radius | [Optional] Border radius |
| light_bg_offset | [Optional] Background color offset |
icons and light_bg_offset only apply to Method 1
The Note tag plugin has two usages
1 | {% note [class] [no-icon] [style] %} |
| Name | Description |
|---|---|
| class | [Optional] Identifier, different identifiers have different color schemes (default / primary / success / info / warning / danger) |
| no-icon | [Optional] Do not display icon |
| style | [Optional] Can override the style in the configuration (simple/modern/flat/disabled) |
simple
1 | {% note simple %} |
default tag
default tag
primary tag
success tag
info tag
warning tag
danger tag
modern
1 | {% note modern %} |
default tag
default tag
primary tag
success tag
info tag
warning tag
danger tag
flat
1 | {% note flat %} |
default tag
default tag
primary tag
success tag
info tag
warning tag
danger tag
disabled
1 | {% note disabled %} |
default tag
default tag
primary tag
success tag
info tag
warning tag
danger tag
no-icon
1 | {% note no-icon %} |
Supported from version 3.2.0 and above
1 | {% note [color] [icon] [style] %} |
| Name | Usage |
|---|---|
| color | [Optional] Color (default / blue / pink / red / purple / orange / green) |
| icon | [Optional] Customizable icon (only supports FontAwesome icons, can also configure no-icon) |
| style | [Optional] Can override the style in the configuration (simple/modern/flat/disabled) |
simple
1 | {% note 'fab fa-cc-visa' simple %} |
Do you use Visa or UnionPay?
2021 is coming soon....
Drive carefully, safety first.
Is this three pieces? Or four pieces?
Do you use Visa or UnionPay?
Rock, Paper, Scissors
The most hated browser by front-end developers
modern
1 | {% note 'fab fa-cc-visa' modern %} |
Do you use Visa or UnionPay?
2021 is coming soon....
Drive carefully, safety first.
Is this three pieces? Or four pieces?
Do you use Visa or UnionPay?
Rock, Paper, Scissors
The most hated browser by front-end developers
flat
1 | {% note 'fab fa-cc-visa' flat %} |
Do you use Visa or UnionPay?
2021 is coming soon....
Drive carefully, safety first.
Is this three pieces? Or four pieces?
Do you use Visa or UnionPay?
Rock, Paper, Scissors
The most hated browser by front-end developers
disabled
1 | {% note 'fab fa-cc-visa' disabled %} |
Do you use Visa or UnionPay?
2021 is coming soon....
Drive carefully, safety first.
Is this three pieces? Or four pieces?
Do you use Visa or UnionPay?
Rock, Paper, Scissors
The most hated browser by front-end developers
no-icon
1 | {% note no-icon %} |
Gallery Album
Available from version 2.2.0 and above
A gallery collection.
Usage:
1 | <div class="gallery-group-main"> |
| Parameter | Description |
|---|---|
| name | Gallery name |
| description | Gallery description |
| link | Link to the album |
| img-url | Gallery cover URL |
Sample
1 | <div class="gallery-group-main"> |

A collection of wallpapers

Images related to Marvel

Images related to OH MY GIRL
Gallery
Available from version 2.0.0 and above
Unlike the old version of the Gallery album, the new Gallery album automatically arranges images based on their length, making it easier to write, similar to the markdown format. It can be inserted into the corresponding markdown as needed.
Usage:
1 | {% gallery [button] %} |
| Parameter | Description |
|---|---|
| button | [Optional] Load more images on button click, set to true/false. Default is false. |
Sample
1 | {% gallery %} |
ไพๅฆ
1 | {% gallery %} |
Usage:
1 | {% gallery url,[link],[button] %} |
| Parameter | Description |
|---|---|
| url | [Required] Identifier |
| link | [Required] Remote JSON link |
| button | [Optional] Load more images on button click, set to true/false. Default is false. |
Example of remote link JSON
There are three parameters: url is required, while alt and title are optional.
1 | [ |
Sample
1 | {% gallery url,https://xxxx.com/sss.json %} |
Tag-hide
Available from version 2.2.0 and above
Please note that it is not recommended to have h1 - h6 headers within the tag-hide plugin content. This is because the Toc will display the hidden content headers, and if the hidden content is not displayed when scrolling the screen, it will cause abnormal scrolling of the Toc.
If you want to hide some text or content and provide a button for users to click to display it, you can use this tag plugin.
inline adds a button to hide content within the text, limited to text only.
(content cannot contain commas, use ‚ instead)
1 | {% hideInline content,display,bg,color %} |
| Parameter | Description |
|---|---|
| content | Text content |
| display | [Optional] Text displayed on the button |
| bg | [Optional] Background color of the button |
| color | [Optional] Text color of the button |
Sample
1 | Which letter is the coolest? {% hideInline Because "C" is for Cool, See Answer, #FF7242, #fff %} |
Which letter is the coolest?
Who is standing behind the door?
block is an independent block for hiding content. It can hide a lot of content, including images, code blocks, etc.
(display cannot contain commas, use ‚ instead)
1 | {% hideBlock display,bg,color %} |
| Parameter | Description |
|---|---|
| content | Text content |
| display | [Optional] Text displayed on the button |
| bg | [Optional] Background color of the button |
| color | [Optional] Text color of the button |
Sample
1 | See Answer |
See Answer
Supported from version 2.3.0 and above
If you need to display a lot of content, you can hide it in a collapsible box and expand it when needed.
(display cannot contain commas, use ‚)
1 | {% hideToggle display,bg,color %} |
| Parameter | Description |
|---|---|
| display | Text displayed on the button |
| bg | [Optional] Background color |
| color | [Optional] Text color |
Sample
1 | {% hideToggle Butterfly Installation Method %} |
Butterfly Installation Method
In your blog root directory
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/Butterfly
If you want to install the newer dev branch, you can
git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/Butterfly
Mermaid
Using the mermaid tag, you can draw Flowcharts, Sequence diagrams, Class Diagrams, State Diagrams, Gantt charts, and Pie Charts. For more details, refer to the mermaid documentation.
1 | # Mermaid |
ๅฏซๆณ๏ผ
1 | {% mermaid %} |
Sample
1 | {% mermaid %} |
pie
title Key elements in Product X
"Calcium" : 42.96
"Potassium" : 50.05
"Magnesium" : 10.01
"Iron" : 5
Tabs
Ported from the NexT theme
Usage๏ผ
1 | {% tabs Unique name, [index] %} |
| Parameter | Description |
|---|---|
| Unique name | The unique name of the tabs block, without commas. It will be used as the #id prefix for each tab, appended with its index number. If the name contains spaces, they will be replaced with hyphens in the generated #id. Must be unique within the current article/page URL! |
| [index] | [Optional] The index number of the active tab. If not specified, the first tab (1) will be selected. If the index is -1, no tab will be selected, similar to collapsed content. Optional parameter. |
| [Tab caption] | The title of the current tab. If not specified, the unique name with the tab index suffix will be used as the tab title. If no title is specified but an icon is provided, the title will be empty. |
| [@icon] | [Optional] FontAwesome icon name (full name, e.g., 'fas fa-font'). Can be with or without spaces; for example, 'Tab caption @icon' is similar to 'Tab caption@icon'. |
Example 1 - Default to the first tab [default]
1 | {% tabs test1 %} |
This is Tab 1.
This is Tab 2.
This is Tab 3.
Example 2 - Default selected tabs
1 | {% tabs test2, 3 %} |
This is Tab 1.
This is Tab 2.
This is Tab 3.
Example 3 - No default value
1 | {% tabs test3, -1 %} |
This is Tab 1.
This is Tab 2.
This is Tab 3.
Example 4 - Custom Tab Name + Icon Only + Icon and Tab Name
1 | {% tabs test4 %} |
Tab name is First Tab
Icon only, no Tab name
Name + icon
Button
Applicable for version 3.0 and above
Usage:
1 | {% btn [url],[text],[icon],[color] [style] [layout] [position] [size] %} |
| Parameter | Description |
|---|---|
| url | [Required] Link address |
| text | [Required] Button text |
| icon | [Optional] Icon |
| color | [Optional] Button background color (default style) or button font and border color (outline style) Options: default/blue/pink/red/purple/orange/green |
| style | [Optional] Button style, default is solid Options: outline/empty |
| layout | [Optional] Button layout, default is line Options: block/empty |
| position | [Optional] Button position, applicable when layout is set to block, default is left Options: center/right/empty |
| size | [Optional] Button size Options: larger/empty |
Sample
1 | This is my website, click the button {% btn 'https://butterfly.js.org/',Butterfly %} |
This is my website, click the button Butterfly
This is my website, click the button Butterfly
This is my website, click the button Butterfly
This is my website, click the button Butterfly
This is my website, click the button Butterfly
1 | {% btn 'https://butterfly.js.org/',Butterfly,far fa-hand-point-right,block %} |
more than one button in center
1 | {% btn 'https://butterfly.js.org/',Butterfly,far fa-hand-point-right,larger %} |
1 | <div class="btn-center"> |
InlineImg
Images in the theme are displayed as block elements by default. If you want to display them as inline elements, you can use this tag plugin.
1 | {% inlineImg [src] [height] %} |
| Parameter | Description |
|---|---|
| src | Image URL |
| height | [Optional] Image height limit |
Sample
1 | Do you think she looks beautiful? |
Do you think she looks beautiful?

I think she looks beautiful. 
Label
Due to the rendering limitations of Hexo, using the label tag plugin at the beginning of a paragraph can cause some issues. For example, paragraphs that consecutively start with the label tag plugin cannot break lines.
It is recommended not to use the label tag plugin at the beginning of a paragraph.
Text to be highlighted
1 | {% label text color %} |
| Parameter | Description |
|---|---|
| text | Text |
| color | [Optional] Background color, default is defaultOptions: default/blue/pink/red/purple/orange/green |
Sample
1 | {% label "Shall I compare thee to a summer's day?" blue %} |
Thou art more lovely and more temperate:
Rough winds do shake the darling buds of May,And summer's lease hath all too short a date:
Sometime too hot the eye of heaven shines,And often is his gold complexion dimmed;
And every fair from fair sometime declines,
Nor lose possession of that fair thou owest;
Nor shall Death brag thou wanderest in his shade,
So long as men can breathe or eyes can see,
So long lives this, and this gives life to thee.
Timeline
Supported from version 4.0.0 and above
1 | {% timeline title,color %} |
| Parameter | Description |
|---|---|
| title | Title/Timeline |
| color | Timeline color default (leave blank) / blue / pink / red / purple / orange / green |
Example
1 | {% timeline 2022 %} |
2022
01-02
This is a test page
1 | {% timeline 2022,blue %} |
2022
01-02
This is a test page
1 | {% timeline 2022,pink %} |
2022
01-02
This is a test page
1 | {% timeline 2022,red %} |
2022
01-02
This is a test page
1 | {% timeline 2022,purple %} |
2022
01-02
This is a test page
1 | {% timeline 2022,orange %} |
2022
01-02
This is a test page
1 | {% timeline 2022,green %} |
2022
01-02
This is a test page
Flink
Support for version 4.1.0
You can insert a friend link list effect on any page.
The content format is the same as the friend link page and supports the yml format.
1 | {% flink %} |
Example
1 | {% flink %} |
ABCJS Score
Render musical scores on the page
1 | # abcjs |
| Parameter | Description |
|---|---|
| enable | Enable ABCJS or not |
| per_page | Load ABCJS on every page. If set to false, you need to add abcjs: true in the front-matter of the pages where you use ABCJS |
Usage:
1 | {% score %} |
Sample
1 | {% score %} |
Series
Display series articles on the page
1 | series: |
| Parameter | Parameter |
|---|---|
| enable | Enable series or not |
| orderBy | Sorting method, default is title, options are title / date |
| order | Sorting order, default is 1, options are 1 (ascending) / -1 (descending) |
| number | Display sequence number |
Usage:
1 | {% series %} |
Add the series parameter in the front-matter of the article and give it an identifier.
Using this tag plugin will display articles with the same identifier in a list format.
If the series identifier is not specified, it defaults to the series identifier of the article where this tag plugin is used.
Sample
1 | {% series docs %} |
- Butterfly document - Get Started
- Butterfly document - Theme Pages
- Butterfly document - Theme Configuration
- Butterfly document - Tag Plugins
- Butterfly document - Q&A
- Butterfly document - Advanced Tutorial
Chartjs
Another way to add charts
1 | # chartjs |
| Parameter | Description |
|---|---|
| enable | Whether to enable chartjs |
| fontColor | Font color of the chart |
| borderColor | Border color of the chart |
| scale_ticks_backdropColor | Background color of the scale labels for radar and polar area charts |
Usage:
1 | {% chartjs [width, abreast, chartId] %} |
| Parameter | Description |
|---|---|
| width | [Optional] Chart width |
| abreast | [Optional] Whether to display side by side. When you write , the chart and description will be displayed side by side.When abreast is true, the width value needs to be configured |
| chartId | [Optional] Chart ID |
Sample
1 | {% chartjs 70 %} |
{
"type": "line",
"data": {
"labels": ["January", "February", "March", "April", "May", "June", "July"],
"datasets": [{
"label": "My First dataset",
"backgroundColor": "rgb(255, 99, 132)",
"borderColor": "rgb(255, 99, 132)",
"data": [0, 10, 5, 2, 20, 30, 45]
}]
},
"options": {
"responsive": true,
"title": {
"display": true,
"text": "Chart.js Line Chart"
}
}
}
1 | {% chartjs %} |
{
"type": "radar",
"data": {
"labels": [
"Eating",
"Drinking",
"Sleeping",
"Designing",
"Coding",
"Cycling",
"Running"
],
"datasets": [
{
"label": "My First Dataset",
"data": [65, 59, 90, 81, 56, 55, 40],
"fill": true,
"backgroundColor": "rgba(255, 99, 132, 0.2)",
"borderColor": "rgb(255, 99, 132)",
"pointBackgroundColor": "rgb(255, 99, 132)",
"pointBorderColor": "#fff",
"pointHoverBackgroundColor": "#fff",
"pointHoverBorderColor": "rgb(255, 99, 132)"
},
{
"label": "My Second Dataset",
"data": [28, 48, 40, 19, 96, 27, 100],
"fill": true,
"backgroundColor": "rgba(54, 162, 235, 0.2)",
"borderColor": "rgb(54, 162, 235)",
"pointBackgroundColor": "rgb(54, 162, 235)",
"pointBorderColor": "#fff",
"pointHoverBackgroundColor": "#fff",
"pointHoverBorderColor": "rgb(54, 162, 235)"
}
]
},
"options": {
"elements": {
"line": {
"borderWidth": 3
}
}
}
}
1 | {% chartjs 40,true %} |
{
"type": "pie",
"data": {
"labels": [
"Programming",
"Music",
"Reading",
"Gaming",
"Fitness",
"Travel"
],
"datasets": [
{
"label": "Favorite Index",
"data": [
30,
24,
19,
14,
9,
4
],
"backgroundColor": {
"dark-mode": [
"rgba(255, 99, 132, 0.5)",
"rgba(54, 162, 235, 0.5)",
"rgba(255, 206, 86, 0.5)",
"rgba(75, 192, 192, 0.5)",
"rgba(153, 102, 255, 0.5)",
"rgba(255, 159, 64, 0.5)"
],
"light-mode": [
"rgba(255, 99, 132, 0.2)",
"rgba(54, 162, 235, 0.2)",
"rgba(255, 206, 86, 0.2)",
"rgba(75, 192, 192, 0.2)",
"rgba(153, 102, 255, 0.2)",
"rgba(255, 159, 64, 0.2)"
]
},
"borderColor": {
"dark-mode": [
"rgba(255, 99, 132, 1)",
"rgba(54, 162, 235, 1)",
"rgba(255, 206, 86, 1)",
"rgba(75, 192, 192, 1)",
"rgba(153, 102, 255, 1)",
"rgba(255, 159, 64, 1)"
],
"light-mode": [
"rgba(255, 99, 132, 1)",
"rgba(54, 162, 235, 1)",
"rgba(255, 206, 86, 1)",
"rgba(75, 192, 192, 1)",
"rgba(153, 102, 255, 1)",
"rgba(255, 159, 64, 1)"
]
}
}
]
},
"options": {
"plugins": {
"legend": {
"labels": {
"color": {
"dark-mode": "rgba(255, 255, 255, 0.8)",
"light-mode": "rgba(0, 0, 0, 0.8)"
}
}
}
}
}
}
้คไบ่ฎก็ฎๆบ็ผ็จๅค๏ผๆๆณไธๅบ่ฟๆๅ
ถไป่ฎฉๆๆๅ
ด่ถฃ็ๅทฅไฝใ
ๆๅฏไปฅๆ ไธญ็ๆๅฐๅ้ ๅบ็ฒพ็พ็่ๅผๅ็ปๆ๏ผ
ๅจๆญค่ฟ็จไธญไน่งฃๅณไบๆ ๆฐ็ๅฐ่ฐๅขใ
I can't think of any other job other than computer programming that interests me.
I can create beautiful paradigms and structures out of nothing,
Countless small mysteries are also solved in the process.