Next主题去除目录自动标号

Next主题自动添加的序号比较生硬,还是文章本身设置的章节序号更加直观自然
我们在写文章时,通常会自己对各个章节进行标序,会使用各种各样合适的序号,像下面这些

  • 一、 二、 三、 四、
  • 1. 2. 3. 4.
  • (1). (2). (3). (4).
  • (一)、 (二)、 (三)、 (四)、
  • ...

但实际上构建时,Next主题会自动为我们的文章加上章节序号,但是当文章本身有章节序的时候,就会显得不伦不类,像下面这样

自动标号


想要取消的话,修改主题配置文件 _config.next.yml文件的toc项,将number改为false即可

1
2
3
4
5
6
7
8
9
10
11
12
# Table of Contents in the Sidebar
# Front-matter variable (nonsupport wrap expand_all).
toc:
enable: true
# Automatically add list number to toc.
number: false #去除博客为目录自动标上序号
# If true, all words will placed on next lines if header width longer then sidebar width.
wrap: false
# If true, all level of TOC in a post will be displayed, rather than the activated part of it.
expand_all: false
# Maximum heading depth of generated toc.
max_depth: 6