next主题的使用

1.主题类型设置

1
2
3
4
5
6
7
8
9
# Schemes 主题类型设置

# scheme: Muse

#scheme: Mist

#scheme: Pisces

scheme: Gemini

有四个类型

2.菜单栏

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
menu:

  home: / || fa fa-home #主页

  #about: /about/ || fa fa-user

  tags: /tags/ || fa fa-tags #标签页

  categories: /categories/ || fa fa-th #种类页

  archives: /archives/ || fa fa-archive #日志页

  #schedule: /schedule/ || fa fa-calendar

  #sitemap: /sitemap.xml || fa fa-sitemap

  #commonweal: /404/ || fa fa-heartbeat

打开后,在myBlog\source路径下新建tags与categories文件夹,并在文件夹下建立index.md文件,
tags下index文件内容:

1
2
3
4
5
6
7
8
9
---

title: 标签

date: {{date}}

type: "tags"

---

categories下index文件内容

1
2
3
4
5
6
7
8
9
---

title: 种类

date: {{date}}

type: "categories"

---

3.修改主页头像

1
2
3
4
5
6
7
8
9
10
11
12
13
avatar:

  # Replace the default image and set the url here.

  url: /images/jiaoye.gif #在这里填入你头像的路径 头像格式为215 X 215

  # If true, the avatar will be displayed in circle.

  rounded: false

  # If true, the avatar will be rotated with the cursor.

  rotated: false

4.开启搜索功能

  • 安装插件hexo-generator-searchdb,执行以下命令:
1
npm install hexo-generator-searchdb --save
  • 修改hexo/config.yml配置内容,新增以下内容到任意位置
1
2
3
4
5
search:
path: search.xml
field: post
format: html
limit: 10000
  • 编辑 主题配置文件,启用本地搜索功能:
1
2
3
# Local search
local_search:
enable: true