教程链接:Hexo小标题旋转风车设置


找到主题配置文件 _config.butterfly.yml

  1. beautifytitle-prefix-icon 处修改为 \f863

    1
    2
    3
    beautify:
    enable: true
    title-prefix-icon: '\f863'
  2. injecthead 处引入以下文件:

    1
    2
    3
    inject:
    head:
    - "<style>#article-container.post-content h1:before, h2:before, h3:before, h4:before, h5:before, h6:before { -webkit-animation: avatar_turn_around 1s linear infinite; -moz-animation: avatar_turn_around 1s linear infinite; -o-animation: avatar_turn_around 1s linear infinite; -ms-animation: avatar_turn_around 1s linear infinite; animation: avatar_turn_around 1s linear infinite; }</style>"

重新部署,启动,就可以看到效果了。


参考 Butterfly 文档(三)主题配置-美化/特效-页面美化 的描述,title-prefix-icon 填写的是 fontawesome 的 icon 的 Unicode 值,通过更改该 Unicode 值可以呈现不同的图标。

image-20241224163342493