在AsciiDoc(Spring Rest Docs)中使用标签 [英] Using tabs in AsciiDoc (Spring Rest Docs)
问题描述
我正在使用Spring Rest Docs生成文档。我想做一些类似Bootstrap的可切换标签。
I'm using Spring Rest Docs to generate documentation. I would like to do something like Bootstrap's Togglable tabs.
Spring文档使用可切换的选项卡,但是我不知道该怎么做。这是一个示例(MockMvc / REST确保): http://docs.spring.io/spring-restdocs/docs/1.1.0.RELEASE/reference/html5/#documenting-your-api
感谢您的帮助。
Spring documentation uses togglable tabs, but I don't know how to do it. Here is an example (MockMvc / REST Assured): http://docs.spring.io/spring-restdocs/docs/1.1.0.RELEASE/reference/html5/#documenting-your-api Thanks for helping.
推荐答案
Ascidoctor中没有对选项卡的内置支持,但它的可扩展性很强,可以轻松添加此类内容。
There's no built-in support for tabs in Asciidoctor but it's very extensible which allows you to add this sort of thing quite easily.
Spring REST Docs文档中的选项卡使用Groovy,CSS和Javascript作为一个小的扩展实现。如果您想看一下代码,它已添加到此提交。
The tabs in the Spring REST Docs documentation are implemented as a small extension using Groovy, CSS, and Javascript. If you want to take a look at the code, it was added in this commit.
自从进行提交以来,扩展名已移至单独的项目。该项目的发行版本可从 https://repo.spring.io/release 获得。有关如何使用扩展程序的一些详细信息,请参见自述文件。
Since that commit was made, the extension's been moved into a separate project. Releases of that project are available from https://repo.spring.io/release. A few details on how to use the extension are available in the README.
这篇关于在AsciiDoc(Spring Rest Docs)中使用标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!