如何从简单的 'asciidoctor file.txt -o file.html' 命令设置 Asciidoc toc.section.depth 值?

How to set Asciidoc toc.section.depth value from simple 'asciidoctor file.txt -o file.html' command?

This FAQ section描述如何设置"section depth"/"TOC level"/toclevel显示在table的内容。但是,我不知道如何在我的简单中实现它:

$ asciidoctor my.txt -o my.html

命令。有人吗?

toclevels 属性对此进行控制。

来自https://asciidoctor.org/docs/user-manual/#user-toc-levels

By default, the TOC will display level 1 and level 2 section titles. You can set a different depth with the toclevels attribute.

:toc:
:toclevels: 4
  1. The toc attribute must be set in order to use toclevels.
  2. toclevels is set and assigned the value 4 in the document’s header. The TOC will list the titles of the section 1, 2, 3, and 4 levels when the document is rendered.