Hexo-theme-purabo 主题及站点配置

温馨提示:点击页面下方以展开或折叠目录~

配置文件

hexo的配置文件有两个

  1. Hexo 根目录下的_config.yml。这是 Hexo 的配置文件,对整个站点生效(无论使用哪个主题)。
  2. purabo 根目录下的 _config.yml。这是 Stun 的配置文件,只对主题生效。

首先我们把 purabo 根目录下的配置文件 _config.yml复制到 Hexo 根目录下并重命名为 _config.purabo.yml。之后改主题配置文件就只改_config.purabo.yml即可。

主题配置

修改_config.purabo.yml中的内容

1. 设置语言

打开_config.purabo.yml,设置language: zh-CN

2. 设置导航菜单

_config.purabo.yml中:

menu:左侧导航菜单
menu_icons:导航菜单图标

想改图标可以看这里

3. 自定义功能设置

3.1 在purabo中,可以选择以下功能是否开启

  • go_top:一键回顶部
  • custom_img:自定义图片大小
    • 在图片链接后加 ?widthxheight ?widthx ?xheight ?scale

  • copy_button: 一键复制按钮
  • about: 关于页面
    • chart: 博客图表统计
  • fold_action: 可折叠功能
  • preloader: 图片预加载功能

3.2 在tag_cloud中可以选择是否开启标签云

3.3 在site中,可以选择以下功能是否开启

  • copyright: 底部版权信息是否显示
  • visitor: 底部站点点击数访客数统计
  • theme_authoer: 是否显示主题作者信息
  • site_time:建站时间是否显示
    • date: 建站日期,格式YYYY-MM-DD
    • time: 建站时间, 格式HH:mm:ss
    • frequency: 时间刷新时间,1000为1秒

3.4 fancybox: 是否开启点击图片查看大图功能
fancybox: true

3.5 search: 站内搜索功能

1
2
3
search:
insight: true # you need to install `hexo-generator-json-content` before using Insight Search
baidu: false # you need to disable other search engines to use Baidu search

3.6 donate: 赞赏功能

3.7 share: 分享功能

1
2
3
4
5
# weibo,qq,qzone,wechat,tencent,douban,diandian,facebook,twitter,google,linkedin
share:
enable: true # 是否启用分享
sites: weibo,qq,wechat,facebook,twitter # PC端显示的分享图标
mobile_sites: weibo,wechat,qq,qzone # 移动端显示的分享图标

3.8 github:

3.9 pagination 分页功能

1
2
3
4
5
6
pagination: # 分页功能
number: false
prev:
alwayShow: true
next:
alwayShow: true

4. 评论功能

comment中:
type:启用哪种评论系统

utterances

详情请见 utterances, 及注释

1
2
3
4
5
6
utterances:
repo: abobot/hexo-blog-comments
issue_term: pathname
label: 💬comments
theme: github-light
crossorigin: anonymous
disqus
youyan
1
2
youyan: 
uid: 1783844 # enter youyan uid
livere
1
2
livere:
uid: # enter youyan uid
gitment
1
2
3
4
5
6
gitment:
githubID:
repo:
ClientID:
ClientSecret:
lazy: false
gitalk

详情请见 gitalk, [评论系统](https://hwame.top/20200520/hello-hexo-configuration.html#5-评论系统及注释

1
2
3
4
5
6
gitalk: # gitalk. https://gitalk.github.io/
owner: #必须. GitHub repository 所有者,可以是个人或者组织。
admin: #必须. GitHub repository 的所有者和合作者 (对这个 repository 有写权限的用户)。
repo: #必须. GitHub repository.
ClientID: #必须. GitHub Application Client ID.
ClientSecret: #必须. GitHub Application Client Secret.

valine

详情请见 valine, 及注释

1
2
3
4
5
6
7
8
9
10
11
12
13
valine: # Valine. https://valine.js.org
appid: # your leancloud application appid
appkey: # your leancloud application appkey
notify: false # mail notifier , https://github.com/xCss/Valine/wiki
verify: false # Verification code
placeholder: Just go go # comment box placeholder
avatar: mm # gravatar style
meta: nick,mail,link # custom comment header
pageSize: 10 # pagination size
visitor: false # Article reading statistic https://valine.js.org/visitor.html
enableQQ: true
recordIP: true
requiredFields: ['mail',] # Nick必填则需3+字符

5. 个人信息profile

根据需要填写

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
# profile
profile:
enabled: true # Whether to show profile bar
avatar: images/avatar.jpg
gravatar: # Gravatar email address, if you enable Gravatar, your avatar config will be overriden
author: 阿波bot
author_title: many things want to learn.
author_description: 个人简介。
location: ChangSha, China
follow: https://github.com/aboobt
# Social Links
social:
links:
github: https://github.com/abobot
# weibo: http://weibo.com/
zhihu: https://www.zhihu.com/people/abobot
gitee: https://gitee.com/abobot
douban: https://www.douban.com/people/abobot/
# twitter: https://twitter.com/
# facebook: /
# dribbble: /
# behance: https://www.behance.net/
rss: atom.xml
link_tooltip: true # enable the social link tooltip, options: true, false
# My Skills
skills:
Git: ☆☆☆☆☆
Gulp: ☆☆☆☆☆
Javascript: ☆☆☆☆☆
HTML+CSS: ☆☆☆☆☆
Bootstrap: ☆☆☆☆☆
ThinkPHP: ☆☆☆☆☆
平面设计: ☆☆☆☆☆
# My Personal Links
links:
Github: https://github.com/aboobt
Blog: http://abobot.github.io
微博: http://weibo.com/
豆瓣: https://www.douban.com/people/abobot/
# 花瓣: http://huaban.com/
# Behance: https://www.behance.net/
# My Personal Labels
labels:
- 前端不会
- 前端开发不会
- 前端重构不会
- Web前端不会
- 网页重构不会
# My Personal Works
works:
name:
link: 1999997.xyz
date: 2021
# My Personal Projects
projects:
abobot/hexo-theme-purabo: https://github.com/abobot/hexo-theme-purable

站点配置

参考 Hexo配置
其他可参考 这个大佬的设置

1. Hexo-theme-purabo-使用教程
2. Hexo-theme-purabo-快速开始
3. Hexo-theme-purabo-主题及站点配置
4. 插件推荐