浅笑の博客

我们的征途是星辰大海


  • 首页

  • 标签29

  • 分类6

  • 归档47

  • 留言板

  • 搜索

next主题安装和配置

发表于 2019-07-26 分类于 Hexo框架 Valine: 本文字数: 1.2k

安装主题

在博客根目录下输入以下命令

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

就可以将next主题文件从https://github.com/iissnan/hexo-theme-next下载到当前目录下的themes里面的next文件夹中。

启用主题

修改站点配置文件

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next

主题设定

目前next主题支持四种Scheme:

  • Muse - 默认 Scheme,这是 NexT 最初的版本,黑白主调,大量留白
  • Mist - Muse 的紧凑版本,整洁有序的单栏外观
  • Pisces - 双栏 Scheme,小家碧玉似的清新
  • Gemini - 左侧网站信息及目录,块+片段结构布局

Scheme的切换通过更改主题配置文件,搜索scheme关键字。你会看到有四行scheme的配置,将你需用启用的scheme前面注释#去除即可。

设定语言

明确设定你所需要的语言

language: zh-CN

设置标签和分类等界面

修改主题配置文件

# ---------------------------------------------------------------
# Menu Settings
# ---------------------------------------------------------------

# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash (/archives -> archives)
menu:
home: /
archives: /archives/
tags: /tags/
categories: /categories/
about: /about/
#sitemap: /sitemap.xml
#commonweal: /404/

去掉相应的#即可
然后新建页面

hexo new page 'tags' #创建tags子目录
hexo new page 'categories' #创建categories子目录

分别修改对应的index.me文件

1
2
3
4
5
---
title: 文章分类
date: 2019-07-26 13:47:40
type: "categories"
---

以及

1
2
3
4
5
---
title: 文章分类
date: 2019-07-26 13:47:40
type: "tags"
---

Hexo NexT
hexo的简介和安装
next主题个性化设置
Zheng Yujie

Zheng Yujie

C++/Python/深度学习
47 日志
6 分类
29 标签
目录
  1. 1. 安装主题
  2. 2. 启用主题
  3. 3. 主题设定
  4. 4. 设定语言
  5. 5. 设置标签和分类等界面
© 2019 Zheng Yujie | 全站共199k字
浙ICP备 - 19035016号
0%