Hexo实战记录(三):next主题配置

next 官网文档

配置主题风格

这里我选择一种紧凑风格

1
2
3
4
5
6
7
8
9
# ---------------------------------------------------------------
# Scheme Settings
# ---------------------------------------------------------------

# Schemes
# scheme: Muse
# scheme: Mist
# scheme: Pisces
scheme: Gemini

配置分类和标签页面

  1. 配置 导航条 出现分类和标签
    修改theme/next/_config.yml

    1
    2
    3
    4
    5
    6
    menu:
    home: / || home
    #about: /about/ || user
    tags: /tags/ || tags
    categories: /categories/ || th
    archives: /archives/ || archive
  2. 创建页面

    1
    2
    hexo new page categories
    hexo new page tags
  3. 编辑 source/tags/index.md 和 source/categories/index.md

    1
    2
    3
    #type 为tags 或者 categories 和功能对应
    type: "tags"
    comments: false

配置 github 等社交链接

修改theme/next/_config.yml

1
2
3
4
5
6
7
8
# Social Links
# Usage: `Key: permalink || icon`
# Key is the link label showing to end users.
# Value before `||` delimeter is the target permalink.
# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, globe icon will be loaded.
social:
#GitHub: https://github.com/yourname || github
#E-Mail: mailto:yourname@gmail.com || envelope

设置首页不显示全文(只显示预览)

修改theme/next/_config.yml

1
2
3
4
5
# Automatically Excerpt. Not recommend.
# Use <!-- more --> in the post to control excerpt accurately.
auto_excerpt:
enable: true
length: 150