asciidoctor - 如何在 Asciidoctor 中隐藏章节标题?

标签 asciidoctor spring-restdocs

我已经搜索过了,但我找不到一种方法来隐藏主页上的部分标题,并且只显示在目录 (:toc:) 中。由此可见screenshot , HomeTest 是 adoc 文件的外部链接。我只想将它保留在 目录 中。

我知道可以使用 [discrete] 关键字在 Table of Contents 中隐藏章节标题,但是否可以反过来做?

这是这个 screenshot 的 adoc 文件:

:toc: left
:source-highlighter: highlight.js
:toclevels: 3
:sectlinks:

== <<Home.adoc#, Home>>

== <<Test.adoc#, Test>>

== Title 1

=== Title 1.1

谢谢!

最佳答案

如果您将章节标题设为文档标题(一个等号),那么您可以通过添加 notitle 文档属性来隐藏它。

= Document Title
:notitle:
:toc:

== Section A

== Section B

目前无法隐藏常规部分标题。

关于asciidoctor - 如何在 Asciidoctor 中隐藏章节标题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43332411/

相关文章:

maven - Asciidoctor:如何使用asciidoctor-maven-plugin将Google Analytics(分析)代码添加到所有HTML页面

spring - 将对象属性传递给 spring Mock mvc 调用

java - Spring REST 文档 : special characters are not shown correctly

spring-boot - 如何使用 spring restdocs 记录包含 JSON 对象的请求正文

spring-mvc - 使用应用程序发布 spring-restdocs html 文档

asciidoc - AsciiDoc 中的 Shell 命令

documentation-generation - Antora顶部导航栏定制

ruby - 如何配置 asciidoctor-gradle-plugin 来处理 plantuml?