3.9插件theme-next/hexo-next-title

插件theme-next/hexo-next-title

安装

1
npm install theme-next/hexo-next-title

使用

官方介绍

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
# Change title and favicon when window is hidden and visible.
title_change:
enable: false

# Enabling this feature on non-desktop devices may not be a good choice, but it depends on you.
onmobile: false

# Enable random title or not.
# Basically `random: true` means you have several titles to display and `random: false` means you have only one title to display.
# When `random: true`, YOU MUST FOLLOW the format which has been commented in two title options below.
# When `random: false`, please fill in the same line of the title option, like `title: one title`.
random: false

# Restore the original title after the specified time in milliseconds.
timeout: 2019

# Options when window is hidden.
hidden:
favicon: /images/favicon-32x32-next.png
title:
#- 404
#- φ(* ̄0 ̄)
#- Waiting for you.

# Options when window is visible.
visible:
favicon: /images/favicon-32x32-next.png
title:
#- 200
#- (✿◡‿◡)
#- Welcome back!

说的是在两个配置文件都可以设置,但是我在主题文件设置没什么用,在网站的设置里面弄成功了

这是我的配置,配置好后,清理一下

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
#插件heme-next/hexo-next-title
# Change title and favicon when window is hidden and visible.
#改变标题和图标时,窗口是隐藏和可见的。
title_change:
enable: true

# Enabling this feature on non-desktop devices may not be a good choice, but it depends on you.
#在非桌面设备上启用此功能可能不是一个好选择,但这取决于您。
onmobile: true

# Enable random title or not.是否启用随机标题。
# Basically `random: true` means you have several titles to display and `random: false` means you have only one title to display.
#基本上,“random:true”表示要显示多个标题,“random:false”表示只显示一个标题。
# When `random: true`, YOU MUST FOLLOW the format which has been commented in two title options below.您必须遵循以下两个标题选项中注释的格式。
# When `random: false`, please fill in the same line of the title option, like `title: one title`. 请填写标题选项的同一行,如“标题:一个标题”。
random: false

# Restore the original title after the specified time in milliseconds.在指定的时间(毫秒)后还原原始标题。
timeout: 2019

# Options when window is hidden.隐藏窗口时的选项。
hidden:
favicon: /images/favicon-32x32-next.png
title:
- !!str 404
- φ(* ̄0 ̄)
- Waiting for you.

# Options when window is visible.
visible:
favicon: /images/favicon-32x32-next.png
title:
- !!str 200
- (✿◡‿◡)
- Welcome back!