安装配置 hexo-next 主题
安装 next 主题
1 | $ cd your-hexo-site |
快速开始
1 | 在 Hexo 中有两份主要的配置文件,其名称都是 _config.yml。 其中,一份位于站点根目录下,主要包含 Hexo 本身的配置;另一份位于主题目录下,这份配置由主题作者提供,主要用于配置主题相关的选项。 |
使用主题
与所有 Hexo 主题启用的模式一样。 当 克隆/下载 完成后,打开 站点配置文件, 找到 theme 字段,并将其值更改为 next。
1 | theme: next |
使用 scheme
更改主题配置文件1
scheme: Gemini
更改语言为中文
编辑 站点配置文件, 将 language 设置成你所需要的语言。建议明确设置你所需要的语言,例如选用简体中文,配置如下:新版本为zh-CH,旧版本为zh-Hans,可以到next/language目录下查看支持的语言配置项
1 | language: zh-CH |
创建标签、分类页面
创建标签、分类页
1 | hexo new page categories\tags |
添加 type
1 | typs: tags\categories |
编辑主题配置文件
去掉 tags\categories 的注释,重启服务,如果没有反应可执行 hexo clean 后重试
侧边栏支持文章目录
主页不现实文章目录,到具体文章页面会显示文章目录,具体配置项在主题配置文件1
2
3
4
5
6
7
8
9# Table Of Contents in the Sidebar
toc:
enable: true
# Automatically add list number to toc.
number: true
# If true, all words will placed on next lines if header width longer then sidebar width.
wrap: false
主页显示文章概要
默认显示文章全文,可以设置主题配置文件打开默认截取字符
1 | # Automatically Excerpt. Not recommend. |