Note

Changing My Blog Theme to Anzhiyu

2025-07-29 #Hexo

Introduction

After using Hexo's Butterfly theme for a long time, it started to feel a bit unrefined. I previously saw someone using the Anzhiyu theme, which is a modified version based on Butterfly and looks very impressive.

If you were already using the Butterfly theme, switching over is extremely simple.

GitHub - Anzhiyu Theme

Applying the Theme

You can download it easily using Git. Execute the following command in your Hexo blog's root directory:

1
git clone -b main https://github.com/anzhiyu-c/hexo-theme-anzhiyu.git themes/anzhiyu

Modify your Hexo configuration file _config.yml to change the theme to anzhiyu:

1
theme: anzhiyu

To make the theme take effect, copy the default configuration file to your project root directory:

1
cp -rf ./themes/anzhiyu/_config.yml ./_config.anzhiyu.yml

Windows users can copy this file manually.

Now, run hexo s and visit http://localhost:4000 to view the preview.

Modifying Configurations

The theme comes with some default configurations that need adjustments. Below are the parts I modified:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Local search ,打开本地搜索,false to true
local_search:
enable: true

# 修改头像链接
# Avatar (头像)
avatar:
img: https://

# 添加自己的访问分析务服
# Analysis
google_analytics:

# 关闭打赏
# Sponsor/reward
reward:
enable: false

# 关闭首次访问时的 Loading,直接载入网页 L:786
# Loading Animation (加载动画)
preloader:
enable: false

# 修改顶部导航 L:1049
# 首页顶部相关配置
home_top:
enable: true # 开关
timemode: date #date/updated
title: 生活明朗
subTitle: 万物可爱。
siteText: anheyu.com
category:
- name: 前端
path: /categories/前端开发/
shadow: var(--anzhiyu-shadow-blue)
class: blue
icon: anzhiyu-icon-dove
- name: 大学
path: /categories/大学生涯/
shadow: var(--anzhiyu-shadow-red)
class: red
icon: anzhiyu-icon-fire
- name: 生活
path: /categories/生活日常/
shadow: var(--anzhiyu-shadow-green)
class: green
icon: anzhiyu-icon-book

# 可以开启自定义右键菜单 L:1221
rightClickMenu:
enable: false

# 该图片 404 了,进行替换 L:1225
# 首页随便逛逛people模式 而非技能点模式,关闭后为技能点模式需要配置 creativity.yml
peoplecanvas:
enable: true
img: https://upload-bbs.miyoushe.com/upload/2024/07/27/125766904/ba62475f396df9de3316a08ed9e65d86_5680958632268053399..png

Issues Encountered

  • Compatibility issues exist with Artalk; the new version is not yet adapted.
  • In narrow screen mode, there is a styling issue with the title section; enabling the main color scheme resolves this.
Comments
Share

Comments