HEXO之Next主题的安装使用

HEXO之Next主题的安装使用

首先从github上clone到本地,在终端cd / 切换到你通过Hexo init生成的根目录,
然后在终端输入命令:

1
$ git clone https://github.com/theme-next/hexo-theme-next themes/next

进入站点的全局配置文件:_config.yml
找到theme字段:设置为

1
theme: next

到这里可以验证一下主题是否被启用。终端输入:

1
hexo s -- debug

关于站点全局_config.yml配置文件的其他一些参数:

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
# Site
title: #博客名
subtitle: #博客副标题
description: #给搜索引擎看的,对站点的描述,可以自定义
author: #作者名称,显示在网站最底部
language: #语言选择
email: #你的联系邮箱
timezone:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: chaserr.github.io #可以填写你的站点域名
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing , 设置生成博文的默认格式
new_post_name: :title.md # File name of new posts
default_layout: post #默认布局
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0 #把文件名称转换为(1)小写或者大写
render_drafts: #显示草稿
post_asset_folder: false #启动Asset文件夹
relative_link: false #把链接改为与根目录相对位置
future: true #显示未来的文章
highlight: #代码块的设置
enable: true
line_number: true
auto_detect: false
tab_replace:

默认的大致就这些,另外给主题添加相关功能的时候后面会慢慢加上其他一些参数。

参考:http://blog.csdn.net/tx874828503/article/details/51577815