problems using hexo theme
2025-07-24  / issue  / hexo

This page was translated by AI and proofread by humans. You may want to view in original language.

Foreword

If you use Alternate-Theme-Config, many weird problems can arise. It's highly recommended to uncomment theme's _config.yml right after you copy it as _config.[theme].yml. If not, you may meet problems below.

Customized 404 page not working

Updated on August 15, 2025: This issue is related to a specific theme and not to Alternate-Theme-Config.

The problem occurred after switching from the original Orange theme to Arch. The online 404 page wasn't mine, but the 404.html provided by Arch. My custom 404 page is located in [lang]/404/index.html. Because a multilingual site can only have one 404.html file in the public directory, to use my custom 404 page, I need to modify the build script to copy [lang]/404/index.html to public. The language you choose for the 404 page is either en or zh-CN, depending on which language you want. I'm using en here.

Below is the change of build script in package.json. You can change en to your desire language.

1
2
3
"scripts": {
"build": "hexo clean && hexo generate && cp public/en/404/index.html public/404.html"
}

Two about menus

Two about nav menus appear in the following configuration, which Friends nav menu is removed but maybe interpolated by theme's about nav. I suspect it is caused by some kind of theme config merge.
Solution: Even if configuration is not required, set enable: false.

同一个nav出现多次 相对路径
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
# _config.oranges.yml
navbar:
-
name: Home
enable: true
path: /
key: home
-
name: Archives
enable: true
path: /archives/
key: archives
-
name: Categories
enable: true
path: /categories/
key: categories
-
name: Tags
enable: true
path: /tags/
key: tags
# 解除下面注释即可解决重复的
# -
# name: Friends
# enable: false
-
name: About
enable: true
path: /about/
key: about

Unexpected theme author's email

Again, stupid Alternate-Theme-Config causes some fields of _config.[theme].yml overwritten by theme's _config.yml.
My _config.[theme].yml doesn't include email, but theme's _config.yml does, which causes theme author's email rendered in my site.

1
2
3
4
5
6
7
8
9
10
11
12
13
# _config.arch.yml
footer:
# social: 社交方式
social:
# name: 名称
# icon: 图标,目前仅支持IconFont部分图标
# path: 地址

# Uncomment as needed to enable / 按需取消注释以启用
-
name: github
icon: github
path: https://github.com/Jim-Elijah