• /themes/butterfly/source/css路径下创建一个cursor.css文件,在文件中添加如下代码:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    body {
    cursor: url(https://cdn.jsdelivr.net/gh/sviptzk/HexoStaticFile@latest/Hexo/img/default.cur),
    default;
    }

    a, img {
    cursor: url(https://cdn.jsdelivr.net/gh/sviptzk/HexoStaticFile@latest/Hexo/img/pointer.cur),
    default;
    }
  • 打开站点主题配置文件_config.butterfly.yml,找到inject,在head处直接引入该文件:

    1
    2
    3
    inject:
    head:
    - <link rel="stylesheet" href="/css/cursor.css">
  • 最后 hexo g 部署就能看见效果啦