一些常用的命令

npm 全局软件更新

# 清理NPM缓存
$ npm cache clean -f

# 全局安装版本检测、版本升级工具
$ npm install -g npm-check
$ npm install -g npm-upgrade

# 全局检测哪些模块可以升级,这里可以根据打印的提示信息,手动安装最新版本的模块
$ npm-check -g

# 全局更新模块
$ npm update -g

# 全局安装或更新Hexo的最新版本
$ npm install --global hexo

hexo 当前目录的软件更新

# 检测Hexo哪些模块可以升级
$ npm-check

# 更新package.json,一直回车即可
$ npm-upgrade

# 更新Hexo的模块
$ npm update --save

更新主题

npm update hexo-theme-butterfly

插入 bilibili 视频

<div
  style="position: relative; padding: 30% 45%;margin-top: 10px;margin-bottom: 10px"
>
  <iframe
    style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"
    src="//player.bilibili.com/player.html?aid=67554570&bvid=BV1XJ411P7yW&cid=117115530&page=1&danmaku=0&high_quality=1"
    scrolling="no"
    border="0"
    frameborder="no"
    framespacing="0"
    allowfullscreen="true"
  ></iframe>
</div>

使用时记得删除前边的aid,替换Bvid为对应的bv号即可

butterfly tag plugins

外挂标签文档
文档里的标签外挂需要下载额外的插件,由于那个插件拖慢生成速度我给关闭掉了,感觉也不太会用复杂的标签,也可以尝试在引入某个特定标签,这个有空再折腾吧。

tabs

{% tabs Unique name, [index] %}

<!-- tab [Tab caption] [@icon] -->

Any content (support inline tags too).

<!-- endtab -->

{% endtabs %}
  • Unique name: 用于标识标签的唯一名称,必填
  • index: 用于指定默认显示的标签页,可选,默认为 1,若为-1 则不显示任何标签页
  • Tab caption: 用于标识标签页的标题,必填
  • @icon: 用于标识标签页的图标,可选

note

butterfly 提供了两种不同的 note 形式,一种可以自定义 icon,一种是为了编辑方便预先默认了一些 icon。

修改 主题配置文件

note:
  # Note tag style values:
  #  - simple    bs-callout old alert style. Default.
  #  - modern    bs-callout new (v2-v3) alert style.
  #  - flat      flat callout style with background, like on Mozilla or StackOverflow.
  #  - disabled  disable all CSS styles import of note tag.
  style: simple
  icons: false
  border_radius: 3
  # Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).
  # Offset also applied to label tag variables. This option can work with disabled note tag.
  light_bg_offset: 0

iconslight_bg_offset只对方法一生效

{% note [class] [no-icon] [style] %}
Any content (support inline tags too.io).
{% endnote %}
名称 用法
class 【可选】标识,不同的标识有不同的配色( default / primary / success / info / warning / danger )
no-icon 【可选】不显示 icon
style 【可选】可以覆盖配置中的 style (simple/modern/flat/disabled)

flat

{% note flat %}
默認 提示塊標籤
{% endnote %}

{% note default flat %}
default 提示塊標籤
{% endnote %}

{% note primary flat %}
primary 提示塊標籤
{% endnote %}

{% note success flat %}
success 提示塊標籤
{% endnote %}

{% note info flat %}
info 提示塊標籤
{% endnote %}

{% note warning flat %}
warning 提示塊標籤
{% endnote %}

{% note danger flat %}
danger 提示塊標籤
{% endnote %}

默認 提示塊標籤

default 提示塊標籤

primary 提示塊標籤

success 提示塊標籤

info 提示塊標籤

warning 提示塊標籤

danger 提示塊標籤

no-icon

{% note no-icon %}
默認 提示塊標籤
{% endnote %}

{% note default no-icon %}
default 提示塊標籤
{% endnote %}

{% note primary no-icon %}
primary 提示塊標籤
{% endnote %}

{% note success no-icon %}
success 提示塊標籤
{% endnote %}

{% note info no-icon %}
info 提示塊標籤
{% endnote %}

{% note warning no-icon %}
warning 提示塊標籤
{% endnote %}

{% note danger no-icon %}
danger 提示塊標籤
{% endnote %}

默認 提示塊標籤

default 提示塊標籤

primary 提示塊標籤

success 提示塊標籤

info 提示塊標籤

warning 提示塊標籤

danger 提示塊標籤

3.2.0 以上版本支持

{% note [color] [icon] [style] %}
Any content (support inline tags too.io).
{% endnote %}
名稱 用法
color 【可选】顔色 (default / blue / pink / red / purple / orange / green)
icon 【可选】可配置自定义 icon (只支持 fontawesome 图标, 也可以配置 no-icon )
style 【可选】可以覆盖配置中的 style(simple/modern/flat/disabled)

flat

{% note 'fab fa-cc-visa' flat %}
你是刷 Visa 還是 UnionPay
{% endnote %}
{% note blue 'fas fa-bullhorn' flat %}
2021 年快到了....
{% endnote %}
{% note pink 'fas fa-car-crash' flat %}
小心開車 安全至上
{% endnote %}
{% note red 'fas fa-fan' flat%}
這是三片呢?還是四片?
{% endnote %}
{% note orange 'fas fa-battery-half' flat %}
你是刷 Visa 還是 UnionPay
{% endnote %}
{% note purple 'far fa-hand-scissors' flat %}
剪刀石頭布
{% endnote %}
{% note green 'fab fa-internet-explorer' flat %}
前端最討厭的瀏覽器
{% endnote %}

你是刷 Visa 還是 UnionPay

2021 年快到了…

小心開車 安全至上

這是三片呢?還是四片?

你是刷 Visa 還是 UnionPay

剪刀石頭布

前端最討厭的瀏覽器

disabled

{% note 'fab fa-cc-visa' disabled %}
你是刷 Visa 還是 UnionPay
{% endnote %}
{% note blue 'fas fa-bullhorn' disabled %}
2021 年快到了....
{% endnote %}
{% note pink 'fas fa-car-crash' disabled %}
小心開車 安全至上
{% endnote %}
{% note red 'fas fa-fan' disabled %}
這是三片呢?還是四片?
{% endnote %}
{% note orange 'fas fa-battery-half' disabled %}
你是刷 Visa 還是 UnionPay
{% endnote %}
{% note purple 'far fa-hand-scissors' disabled %}
剪刀石頭布
{% endnote %}
{% note green 'fab fa-internet-explorer' disabled %}
前端最討厭的瀏覽器
{% endnote %}

你是刷 Visa 還是 UnionPay

2021 年快到了…

小心開車 安全至上

這是三片呢?還是四片?

你是刷 Visa 還是 UnionPay

剪刀石頭布

前端最討厭的瀏覽器

文章引用

配置Hexo常用命令_20221001092539

wowjs

flip动画效果。

折叠框

{% folding 参数(可选), 标题 %}
![](https://bu.dusays.com/2022/05/19/628533399e7a1.jpg)
{% endfolding %}
  1. 颜色:blue, cyan, green, yellow, red
  2. 状态:状态填写 open 代表默认打开。
查看嵌套测试
查看嵌套测试2
查看嵌套测试3

hahaha

iframe

在文章中插入 iframe,可以用于展示视频、音乐、地图等。

{% iframe url [width] [height] %}

参考文档: